由于以下错误,我无法启动chromedriver会话:
[0-0] 2021-04-14T02:07:34.751Z DEBUG webdriver: request failed due to status 33
[0-0] 2021-04-14T02:07:34.751Z ERROR webdriver: Request failed with status 500 due to session not created: session not created: This version of ChromeDriver only supports Chrome version 90
Current browser version is 89.0.4389.114 with binary path /usr/bin/google-chrome
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'andisan-GL62M-7RDX', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '5.4.0-70-generic', java.version: '1.8.0_191'
Driver info: driver.version: unknown
remote stacktrace: #0 0x5646652bde89 <unknown>
我使用的是WebDriverIO 6和chromedriver
软件包版本89.0.0
...
"@wdio/selenium-standalone-service": "^6.11.0",
"chromedriver": "^89.0.0",
"webdriverio": "^6.11.0"
...
据我所知,Chrome 90仍处于测试阶段,所以这个错误消息可能具有误导性。关于为什么会发生这种情况,以及如何解决它,有什么线索吗?
这看起来像是standalone-service
包的临时问题,它下载了错误的驱动程序版本。因此,为了解决这个问题,你可以设置一个特定的驱动程序版本,该版本应该与你的浏览器版本一致(在你的情况下是89.0.4389.14(
在wdio.conf.js
文件中
export.config = {
// ...
services: [
['selenium-standalone', { drivers: { chrome: '89.0.4389.114' } }]
],
// ...
};