我正在完成一个appium教程,我刚刚设置了我的sdk。一切正常,只是因为findelementbyaccessibilityid方法,我的测试无法编译。当我用红色灯泡悬停在红色文本上时,它说, Cannot resolve method 'findElementByAccessibilityID' in 'AppiumDriver'
编译错误是: error: cannot find symbol driver.findElementByAccessibilityID("Webview Demo").click();
我的测试是这样的:
@Test
public void testHybridApp() throws InterruptedException {
driver.findElementByAccessibilityID("Webview Demo").click();
Thread.sleep(1000);
driver.context(getWebContext(driver));
driver.get("https://cloudgrey.io");
assert driver.getTitle().equals("Cloud Grey: Appium Delivered");
}
暂无答案!
目前还没有任何答案,快来回答吧!