問題:appium 無法獲得彈出的 提示升級對話框。
平臺:win 10+ node版APPIUM +魅族 + android 7.1.2
解決流程:
1. 啓用UIautomator2
"automationName": "uiautomator2"
2. 使用uiautomator的內置JAVA命令選擇相關控件,不要使用XPATH或者id一類的。
driver.find_element_by_android_uiautomator('new UiSelector().className(\"android.widget.TextView\").textContains(\"取消\")')
完美解決問題
如果你看懂了將會爲你節省 3.5小時左右。