1.1 UIAutomatorView Android SDK自带的定位工具
位置:Android SDK/tools/uiautomatorviewer.bat
元素常见几个属性:
text
resoureid:
class:元素标签
content-desc:元素功能描述
1.2 Appium Desktop Inspector
appium server自带的定位工具
1.3 Weditor
Uiautomator2 python第三方库 appUi自动化测试框架
安装:
命令01:cmd:pip install Uiautomator2
命令02:cmd:python-m uiautomator2 init
命令03:cmd:pip install weditor
确认按装:cmd:wedito-help
如果出现报错如下:
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
解决方法:降低安装版本:pip install weditor==0.6.