【发布时间】:2018-09-05 14:50:36
【问题描述】:
我有 android:hint="oldtext" 的 EditText。在 Appium 测试项目中,通过 Android UIAutomator 找到这个元素:
WebElement element =
driver.findElementByAndroidUIAutomator("new UiSelector().text(\"oldtext\");
然后我向元素发送新文本并调用 get 方法
element.sendKeys("newText");
element.getText();
我想断言新文本,但它抛出 NoSuchElementException:
org.openqa.selenium.NoSuchElementException: UiSelector[TEXT=oldText]
For documentation on this error, please visit:
http://seleniumhq.org/exceptions/no_such_element.html
【问题讨论】:
标签: android appium appium-android