Appium异常汇总

微信8.0.19

在这里插入图片描述
解决办法:下载豌豆荚App市场,下载历史版本的微信7 – 8.0.3

Appium无法启动

selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. Details: The desiredCapabilities object was not valid for the following reason(s): ‘platformVersion’ must be of type string

原因:platformVersion值必须是字符串
解决办法:修改启动参数

platformVersion:‘9’

无法获取上下文

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 91
Current browser version is 74.0.3729.136 with package name com.lemon.lemonban

原因:浏览器驱动错误
解决办法:修改启动参数的浏览器驱动为74版本的
chrome驱动下载地址:https://liushilive.github.io/github_selenium_drivers/md/Chrome.html

小程序切换上下文报错

环境:appium1.21.0、微信8.0.3
在这里插入图片描述
看图可以看到驱动版本没有错
启动参数desired_caps["chromedriverExecutable"] = 'D:\ChromeDrivers\chrome89'配置了还是报错

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Command ‘D:\ChromeDrivers\chrome89’ not found. Is it installed?

启动参数desired_caps["chromedriverExecutableDir"] = 'D:\ChromeDrivers\chrome89'配置了还是报错

selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: No Chromedriver found that can automate Chrome ‘74.0.3729’. You could also try to enable automated chromedrivers download server feature. See https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/web/chromedriver.md for more details

原因:未知
解决办法1:修改启动参数

desired_caps["chromedriverExecutable"] = 'D:\ChromeDrivers\chrome89\chromedriver.exe'

不用配置:desired_caps["chromedriverExecutableDir"] = 'D:\ChromeDrivers\chrome89

解决办法1:修改appium启动参数
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值