我收到此錯誤如下:試驗是成功的,但有一個類未發現異常
拋出java.lang.ClassNotFoundException,如果我運行下面的代碼:
@Test
public void alert() throws MalformedURLException, InterruptedException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("browserName", "");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("deviceName", "emulator-5554");
capabilities.setCapability("platformVersion", "5.1");
capabilities.setCapability("appPackage", "com.example.android.apis");
capabilities.setCapability("appActivity","com.example.android.apis.ApiDemos");
capabilities.setCapability("newCommandTimeout", "1000");
driver = (AndroidDriver) new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
請讓我知道爲什麼這個錯誤被拋出,我錯過了任何罐子。
我使用:
硒3.0.0,Java客戶端4.2.1罐,硒的Android驅動程序JAR和Appium 1.16.4.1
'RemoteWebDriver'是硒獨立-的server.jar的'部分'。所以下載jar並使用它代替'Java-client jar' –
你可以共享'java.lang.ClassNotFoundException'的堆棧跟蹤嗎? – Mahipal