使用uiautomatorviewer可以抓取到的用来定位控件的元素大概有
text
resource-id
content-desc
index
除此之外,appium还支持按Xpath来定位控件。
下载地址:
链接: https://pan.baidu.com/s/1hjAr5tbMXetJjYXgAjIxUA 密码: xnjs
安装和使用:
1. 将所有jar包拷贝到%SDK%/tools\lib目录下,覆盖原来的uiautomatorviewer.jar
2. 使用%SDK%/tools\uiautomatorviewer.bat 运行即可。
原创文章,作者:iTestCat,保留所有权利,禁止转载,如若转载,请联系作者!