安装uiautomator2、app定位元素工具---weditor
注:前提条件,确认手机已是usb调试模式
一、uiautomator2:
1、安装
pip install --pre uiautomator2 pip install pillow
2、初始化
python -m uiautomator2 init
完成后手机会有ATX的app,点击进去,启动UIAUTOMATOR
二、weditor
1、安装:
pip install --pre --upgrade weditor
2、使用:
python -m weditor
步骤2后,默认会通过浏览器打开页面如下:
*注意报错:
若运行python -m weditor 报错:
File "C:\Users\l\AppData\Local\Programs\Python\Python38-32\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
则:在文件夹快速搜索:asyncio.py,在该py中添加如下3行代码,然后重新运行python -m weditor即可
import sys if sys.platform == ‘win32‘: asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
相关推荐
liuxudong00 2020-11-19
wwzaqw 2020-11-11
lihaoxiang 2020-11-05
CrossingX 2020-11-04
xuegangic 2020-10-17
86417413 2020-11-25
83206733 2020-11-19
86276537 2020-11-19
83266337 2020-11-19
86256434 2020-11-17
zhouboxiao 2020-11-16
rise 2020-11-22
sssdssxss 2020-11-20
windle 2020-11-10
孙雪峰 2020-10-30
85477104 2020-11-17
xfcyhades 2020-11-20
cheidou 2020-11-19