大家好,我是DZ,接上篇文章uiautomator2自动化测试系列(一)继续讲解系列课程。如有问题文章底部留言区留言讨论吧!
一、元素定位
首先安装 weditor (UI Inspector),不用原生的uiatomator的原因是uiautomator是独占资源,所以当atx运行的时候uiautomatorviewer是不能用的,为了减少atx频繁的启停,所以推荐使用weditor(调用python-uiautomator2的接口避免的冲突问题)。
pip install -U weditor
Windows系统可以使用命令在桌面创建一个快捷方式
python -m weditor --shortcut
命令行启动
python -m weditor