在Appium中收到錯誤消息「功能未實現」...請幫助!Appium中未實現的功能錯誤消息
公開課登錄{
DesiredCapabilities caps; AndroidDriver驅動程序;
@BeforeTest
public void test() throws MalformedURLException, WebDriverException, InterruptedException {
File appdir= new File("src");
File app= new File(appdir, "ECare.apk");
caps= new DesiredCapabilities();
caps.setCapability(MobileCapabilityType.PLATFORM_NAME,Platform.ANDROID);
caps.setCapability(MobileCapabilityType.DEVICE_NAME, "Android Emulator");
caps.setCapability(MobileCapabilityType.APPIUM_VERSION, "1.4.16.1");
caps.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
//caps.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, 300000);
caps.setCapability(MobileCapabilityType.HAS_TOUCHSCREEN, "True");
driver=new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), caps);
driver.manage().timeouts().implicitlyWait(9, TimeUnit.SECONDS);
}
@Test
public void okOnAlert() throws InterruptedException
{
WebDriverWait wait= new WebDriverWait(driver, 2);
wait.until(ExpectedConditions.alertIsPresent());
Alert alert= driver.switchTo().alert();
driver.findElementById("com.android.packageinstaller:id/dialog_container").getText();
Thread.sleep(3000);
alert.accept();
}
@AfterTest
public void End()
{
driver.quit();
}
} Trying to click on allow button but unable to click :(
這將是有益的,看看整個錯誤輸出,並有其背景出現問題的詳細信息。 – rene