參數中添加了:node
automationName: Uiautomator2
運行以下:python
[UiAutomator2] Starting UIAutomator2 server 3.1.1
[UiAutomator2] Using UIAutomator2 server from
'/Users/zhangc/.nvm/versions/node/v10.15.0/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@3.1.1@appium-uiautomator2-server/apks/appium-uiautomator2-server-v3.1.1.apk' and test from
'/Users/zhangc/.nvm/versions/node/v10.15.0/lib/node_modules/appium/node_modules/_appium-uiautomator2-server@3.1.1@appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
appium-uiautomator2-server-v3.1.1.apk 和 appium-uiautomator2-server-debug-androidTest.apk兩個apk必須裝在真機中
否則會報錯。
把電腦中的apk拷貝到手機中安裝便可。
參考文章:https://testerhome.com/topics/10333