First time try auto test using Python with Uiautimator
Anaconda
1.python=3.8.8
2.pip install Uiautomator=1.0.2
[WinError 10061] 無法連線,因為目標電腦拒絕連線。
-Uiautomator2=2.16.0
-python -m uiautomator2 init -安裝ATX後可辨識(Uiautomator依舊不行)
-添加adb環境變數
USB device …… is offline”
-從開
-reset
adb kill-server
adb start-server
成功連上後
import uiautomator2 as ui2 print("start")
ui2.connect("20080411") #裝置ID(adb devices)
print(ui2.Device.info)
UI Automator Viewer
./SDK/uiautomatorviewer.bat
UI Automator Viewer error (原因抓靜態)
pip install--pre --upgrade weditor
python3 -m weditor