【发布时间】:2020-07-21 14:39:08
【问题描述】:
我正在使用适用于 Android 的 Appium
点击元素的以下工作
driver.findElement(By.xpath("//*[@resource-id='com.app.android:id/prelogin_signup']")).click();
但我正在尝试检查屏幕上是否有元素,我尝试了以下操作
if (driver.findElement(By.xpath("//*[@resource-id='com.app.android:id/prelogin_signup']")).isDisplayed()) {
System.out.println("FOUND");
} else {
System.out.println("NOT FOUND!");
}
但它返回一个异常说
INFO: HTTP Status: '405' -> incorrect JSON status mapping for 'unknown error' (500 expected)
org.openqa.selenium.WebDriverException: Method is not implemented
如何检查某个元素是否在屏幕上?
【问题讨论】:
标签: appium