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