我正在尝试创建一个 Appium 框架,但我坚持创建 android 驱动程序。服务器(Appium REST http interface listener started on 0.0.0.0:4723
)已启动,但在客户端,驱动程序创建一直失败。以下是详细信息。
错误:消息:java.lang.NoClassDefFoundError: org/openqa/selenium/remote/ProtocolHandshake
setup:
Java_client: 6.0.0
Appium server: same result with both 1.7.2 and 1.8.1
Cucumber+Junit+Maven
代码:
DesiredCapabilities dc;
dc.setCapability(MobileCapabilityType.AUTOMATION_NAME, "UIAUTOMATOR2");
URL url=new URL("http://0.0.0.0:4723/wd/hub");
AppiumDriver driver=new AndroidDriver(url,dc);
钩子前失败:AppiumController.setup()
Message: java.lang.NoClassDefFoundError: org/openqa/selenium/remote/ProtocolHandshake
at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:93)
at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:88)
at config.DriverCreator.setAndroidDriver(DriverCreator.java:19)