Python之UIAutomator2自动化工具
安装
安装uiautomator2
1 | pip3 install uiautomator2 |
安装weditor
1 | pip3 install weditor |
adb连接手机
手机开启adb
![]()
手机安装uiautomator2
手机连接电脑上
运行
1 | # init就是所有USB连接电脑的手机上都安装uiautomator2 |
![]()
![]()
启动weditor
启动方法
第一种方法直接在终端输入
weditor会自动打开浏览器在终端输入
python -m weditor
连接手机
通过USB连接
语法
1 | d = u2.connect('IP:端口') |
演示
1 | import uiautomator2 as u2 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 ZSSのW啥都学!


