1.下載uiautomator
地址:
https://github.com/kingdawin/uiautomator
https://pypi.python.org/pypi/uiautomator
2.環(huán)境變量 添加Python目錄的script路徑咐旧,因?yàn)橐么寺窂较碌膒ip.exe工具安裝uiautomaor
C:\Users\101004679\AppData\Local\Programs\Python\Python35-32\Scripts
3.兩種安裝uiautomator的方法
1)pip install uiautomator
(聯(lián)網(wǎng)安裝)
2)python setup.py install
(已下載離線包)
4.按照github酝锅,使用模塊的api編寫(xiě)腳本
https://github.com/kingdawin/uiautomator
tip
打開(kāi)Python ide Spyder后,adb會(huì)啟動(dòng)呼巴,在用MonkeyRunner寫(xiě)測(cè)試腳本時(shí)吴藻,要先關(guān)閉Spyder