【发布时间】:2015-05-24 16:59:48
【问题描述】:
Android 中的应用有一个弹出的登录对话框。 我需要在 Appium 中测试它(使用 Selenium java) 当我单击登录按钮时,它将打开对话框,但 selenium 命令无法找到我需要输入 email 和 password 的文本框>.
driver.findElement(By.id("login_sign_in_button")).click(); // works fine
driver.findElement(By.id("email_address")).sendKeys("abc@xxx.com");// unable to locate the element**
【问题讨论】:
-
究竟是什么错误?喜欢堆栈跟踪?
-
Selenium 给我这个错误:“线程“主”org.openqa.selenium.NoSuchElementException 中的异常:使用给定的搜索参数无法在页面上找到一个元素。(警告:服务器没有不提供任何堆栈跟踪信息)”
-
你能得到
html并提供吗? -
> info: [debug] [BOOTSTRAP] [debug] 使用:UiSelector[INSTANCE=0, RESOURCE_ID=com.abc.abc/email_address] > info: [debug] [BOOTSTRAP] [debug]使用:UiSelector[DESCRIPTION=email_address, INSTANCE=0] > info: [debug] [BOOTSTRAP] [debug] 未能定位元素。清除辅助功能缓存并重试。 > info: [debug] [BOOTSTRAP] [debug] 使用带有 contextId 的 ID 查找 email_address:multiple: false > info: [debug] [BOOTSTRAP] [debug] 返回结果:{"value":"No element found","状态”:7}
-
你的意思是对话框的xml?
标签: android selenium android-alertdialog appium