WebDriver IO在Botium中使用时无法创建chrome浏览器会话



我已经安装了Botium-Binding,并按照https://github.com/codeforequity-at/botium-connector-webdriverio.中的文档准备了我的机器来安装selenium独立服务器一旦一切都设置好了,我已经添加了以下功能到botium。

samples/customscripts目录下的json文件。
"WEBDRIVERIO_OPTIONS": {    
"capabilities": {
"browserName": "chrome",

}
}

我已经执行npm install && npm run mocha命令触发运行器。

我所能看到的是Webdriver会话正在创建和终止,错误如下:

WebdriverIO Plugin Sample
Starting ChromeDriver 92.0.4515.107 (87a818b10553a07434ea9e2b6dccf3cbe7895134-refs/branch-heads/4515@{#1634}) on port 44325
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
1) "before each" hook for "contractcancellation"

0 passing (9s)
1 failing
1) WebdriverIO Plugin Sample
"before each" hook for "contractcancellation":
Error: WebDriver error on startup: Failed to create session.
Make sure to connect to valid hostname:port or the port is not in use.
If you use a grid server 
Make sure to add vendor prefix like "goog:", "appium:", "moz:", etc to non W3C capabilities.
See more https://www.w3.org/TR/webdriver/#capabilities

尝试将主机名、端口、平台添加到功能中,但没有用。寻找一些帮助在这方面让我解锁。

您必须按照说明安装与您的Chrome版本匹配的chromedriver版本(如pcalkins上面所写)。

如果这没有帮助,我建议启用详细日志记录,以更深入地了解发生了什么。您可以在这里发布日志输出以供进一步调查。

最新更新