【发布时间】:2016-09-17 07:37:52
【问题描述】:
我目前正在尝试自动化登录流程。快乐路径的编码工作正常。我现在正在为无效凭据编码。
我的代码如下所示:
driver.findElement(By.xpath("//android.widget.Button[@text='Password']").click;
//At this point the button is pressed
Thread.sleep(10000); //Screen with the following item is definitely visible
MobileElement actual = (MobileElement)(new WebDriverWait(driver, 30).until(ExpectedConditions.presenceOfElementLocated(By.xpath("//android.view.View[@content-desc='Invalid user ID or password. Try again']"))));
//Note when I print out the xml and use xpathfinder I get 1 response
我收到了这样的回复:
Am element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
【问题讨论】: