文章目录
入门一下uiautomator2
1、先准备一台开启了开发者选项的安卓手机,连接上电脑,此处直接打开MuMu模拟器。
2、确保执行adb devices可以看到连接上的设备。
3、运行pip3 install -U uiautomator2 安装uiautomator2。
4、运行python3 -m uiautomator2 init安装包含httprpc服务的apk到手机。
5、安装weditor在线元素查看器。
pip install -v weditor==0.6.4 -i https://pypi.douban.com/simple(版本相对稳定,不会产生字符集影响报错)
6、命令行直接输入 weditor 会自动打开浏览器(http://localhost:17310/),输入设备的ip或者序列号,点击Connect即可。