Appium自动化测试问题收集册

一、Original error:Could not proxy command to remote server. Original error:socket hang up

在跑自动化脚本的时候,Appium报错,直接退出或者安装apk失败,需要将测试机器上的Appium Setting和服务都卸载掉,然后重新跑就可以了。
参考:https://blog.csdn.net/xgh1951/article/details/90606159

二、WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: A new session could not be created. Details: session not created: This version of ChromeDriver only supports Chrome version 89 Current browser version is 83.0.4103.106 with package name com.xx.xx.xx

在回放H5页面事件的时候,Appium需要在Native和WebView之前切换context,然后就报了ChromeDriver版本不一致的错误,这是因为服务器上Appium的ChromeDriver版本和测试机上WebView的Chrome版本不一致引起。

解决方案一
在https://npm.taobao.org/mirrors/chromedriver上下载跟测试机相对应的ChromeDriver,然后替换Appium安装目录下的ChromeDriver:

/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-chromedriver/chromedriver/mac/chromedriver

解决方案二
下载对应的ChromeDriver后,在python脚本中指定ChromeDriver的位置:

caps = {
“chromedriverExecutable”:“chromedriver的路径”
}

参考:https://blog.csdn.net/qq_32722729/article/details/103201616

你可能感兴趣的:(Appium自动化测试问题收集册)