菜鸟的学习之路
1、连接Android设备
adb connect 设备IP 或 使用adb线连接
2、打开待测试设备的root权限
adb root
注意:打开已连接设备安装apk的权限(未打开此权限,无法向设备端安装调试apk,调用weditor时会出现Error:Local server not start,start with)
3、命令行安装uiautomator2
pip install uiautomator2 已安装uiautomator2库忽略此步骤
4、 命令行安装可视化查看器
pip install weditor
5、命令行安装u2调试apk
python -m uiautomator2 init
6、打开查看器
python -m weditor
命令行输入命令后会弹出浏览器选择窗口,选择浏览器后显示屏幕及UI元素