【发布时间】:2018-10-22 21:51:03
【问题描述】:
我已尝试在我的 Eclipse IDE 中多次运行此代码,但每次都会出现以下错误。我真的不知道出了什么问题以及如何解决这个问题。请有人帮忙。我在 IDE 中编写了以下代码。
File f = new File("src"); File fs = new File(f,"ApiDemos-debug.apk");
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(MobileCapabilityType.DEVICE_NAME, "Demo");
cap.setCapability(MobileCapabilityType.APP, fs.getAbsolutePath());
System.setProperty("webdriver.http.factory", "apache");
AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap);
错误信息:
Exception in thread "main" org.openqa.selenium.WebDriverException: It is impossible to create a new session because 'createSession' which takes HttpClient, InputStream and long was not found or it is not accessible
【问题讨论】:
标签: appium-android