Appium 自动化测试不稳定,总是运行一段时间后

1、报错:

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

解决方案:添加:

desired_caps['newCommandTimeout'] =6000

self.driver.implicitly_wait(15)

2、报错:

Try to increase the 90000ms adb execution timeout represented by 'adbExecTimeout' capability

解决方案:添加:desired_caps['adbExecTimeout'] =200000

3、报错:

error: The instrumentation process cannot be initialized. Make sure the application under test does not crash and investigate the logcat output.

解决方案:

需要用命令卸载Appium Settings

adb uninstall io.appium.uiautomator2.server.test

然后在重新执行就可以了。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容