啟動appium時配置中添加:
解釋:使用appium-desktop 1.6.3以及以上版本測試Android7.0及以上版本,必須使用uiautomator2;
但是appium的appium-uiautomator2-driver有一個問題,就是它使用的adb端口寫死了端口必須是5037(即使在啟動appium的driver中設定adbPort也沒用)
netstat -ano | findstr 5037
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsISPrdEZwZ1Rh5WNXp1bwNjW1ZUba9VZwlHdsATOfd3bkFGazxCMx8VesATMfhHLlN3XnxCMwEzX0xiRGZkRGZ0Xy9GbvNGLpZTY1EmMZVDUSFTU4VFRR9Fd4VGdsYTMfVmepNHLrJXYtJXZ0F2dvwVZnFWbp1zczV2YvJHctM3cv1Ce-cmbw5SNwMzMzEzYmZGM1kjNzIzNxYzX5AzN1ETMyIzLcBTMxIDMy8CXn9Gbi9CXzV2Zh1WavwVbvNmLvR3YxUjL4M3Lc9CX6MHc0RHaiojIsJye.png)
啟動appium時配置中添加:
解釋:使用appium-desktop 1.6.3以及以上版本測試Android7.0及以上版本,必須使用uiautomator2;
但是appium的appium-uiautomator2-driver有一個問題,就是它使用的adb端口寫死了端口必須是5037(即使在啟動appium的driver中設定adbPort也沒用)
netstat -ano | findstr 5037