安卓用户名字段详情: content-desc:类型: android.widget.EditText文本:用户名索引:0已启用:真实位置:{30,293}大小:{480,60} checkable: false checked: false focusable: true clickable: true long-clickable: true package: true package: com.senrysa.parkingplace password: false resource-id: com.senrysa.parkingplace:id/LoginUserName scrollable: false selected: false xpath: false
我已经创建了带有属性文本的部分xpath ...即xpath =“//android.widget.EditText@text=‘用户名’”)
但它并没有奏效。
如何在android/iOS本机应用程序上测试xpath已确定正确元素?
发布于 2016-06-30 07:07:43
您可以尝试增加WebDriver的隐式等待时间,这样在元素可见之前它就不会出错。
请分享你的代码片段和错误堆栈,以获得精确的解决方案。
发布于 2016-06-30 08:29:40
当您只想确认特定元素的xpath时,您应该尝试以下操作:
click if >单击if button/link
我想,这将是验证@Tanmay的最简单方法
发布于 2016-06-30 11:48:18
@Narendra
我通过XPath测试仪查过了..。它工作正常。
但
当我们使用@AndroidFindBy(xpath = ("//android.widget.EditText@text='Username'"))不起作用
@AndroidFindBy由此xpath标识,其中作为绝对xpath工作正常。
https://stackoverflow.com/questions/38114840
复制相似问题