我正在使用Maven项目,正在使用appium并尝试在android设备中启动浏览器。
在这里,我无法在android设备中启动应用程序,并且在appium日志中也无法生成
尝试1。 public static AndroidDriver driver = new AndroidDriver(new URL(“ http://127.0.0.1:4723/wd/hub”),capabilities);
尝试2。
public static AppiumDriver<MobileElement> driver1;
URL url1 = new URL("http://127.0.0.1:4723/wd/hub");
driver1 = new AppiumDriver<MobileElement>(url1, caps);
public static AndroidDriver<MobileElement> driver;
@BeforeTest
public void appLaunch() throws MalformedURLException, InterruptedException
{
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Device");
cap.setCapability(MobileCapabilityType.BROWSER_NAME, "Chrome");
cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.0");
//cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "5.1");
cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "Android");
cap.setCapability("appPackage", "com.android.chrome");
cap.setCapability("appActivity", "com.google.android.apps.chrome.Main");
driver=new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap);
driver.get("https://gmail.com");
}
预期结果: 驱动程序级别,appium应该启动,并且在android设备中的代码应该可以工作
错误消息: ConfigarationError显示在invoker.class中(第532行)
enter code here