gpt4 book ai didi

java - 我无法修复我在代码中遇到的错误,我猜我下载了所有需要的 Jar 文件

转载 作者:行者123 更新时间:2023-11-30 10:27:24 24 4
gpt4 key购买 nike

<分区>

我在以下行中遇到错误:

dr = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

--> 未处理的异常类型 MalformedURLException

代码是:

import java.net.MalformedURLException;
import java.net.URL;

import org.openqa.selenium.By;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.testng.annotations.Test;

import io.appium.java_client.android.AndroidDriver;

public class dailerTest {

AndroidDriver dr;
@Test
public void call() {

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "G6");
capabilities.setCapability("platformVersion", "7.0");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("appPackage", "com.android.contacts");
capabilities.setCapability("appActivity", "activities.DialtactsActivity");

dr = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);

}

}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com