appium 运行代码提示 设备未连接

运行代码产生类似以下错误

 

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error
 occurred while processing the command. Original error: Could not find a connected Android
 device.

 

【解决方案】由于设备未连接,或者连接后未开启USB Debug。重新连接设备即可。

更换手机设备后如下对应的属性要记得更新,否则无法正常运行脚本。

desired_caps['platformVersion'] = 'XXX'

desired_caps['deviceName'] = 'xxx'

 

微信答疑:tsu130

posted @ 2021-05-31 17:37  天枢子软件测试  阅读(197)  评论(0)    收藏  举报