使用appium自動化測試時,報錯:Original error: Could not proxy command to remote server. Original error: Error: socket hang up
去掉uiautomator2后,可執行成功
desired_caps['automationName'] = 'uiautomator2'
經分析后,是因為uiautomator2版本不對
解決辦法:
在終端執行以下命令:
adb uninstall io.appium.uiautomator2.server
adb uninstall io.appium.uiautomator2.server.test
然后重新安裝Appium Settings即可解決以上問題