python uiautomator2 安装


1.安装:

  pip install -i https://pypi.tuna.tsinghua.edu.cn/simple uiautomator2

  pip install -i https://pypi.tuna.tsinghua.edu.cn/simple weditor

2.使用:

  python -m uiautomator2 init:# init 所有的已经连接到电脑的设备

  python -m weditor   #启动weditor,用于定位手机元素,只是辅助功能

  python程序:

import os

# init 所有的已经连接到电脑的设备
a = os.popen("python -m uiautomator2 init")
print(a.read())

#启动 weditor
b = os.popen("python -m weditor")
print(b.read())

 

3.下载Android驱动:https://www.androiddevtools.cn/

 

4.pip install -i https://pypi.tuna.tsinghua.edu.cn/simple scikit-image   #对比图片会用到

  

  

 

  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM