会话未创建:Chrome版本必须在71到75之间

时间:2019-08-08 09:57:08

标签: selenium selenium-webdriver cucumber selenium-chromedriver

我正在尝试使用黄瓜硒执行测试用例,但是在运行时出现以下错误
npm测试

SessionNotCreatedError: session not created: Chrome version must be between 71 and 75
       (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.18.0-15-generic x86_64)
         at Object.checkLegacyResponse (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/lib/error.js:529:15)
         at parseHttpResponse (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/lib/http.js:509:13)
         at doSend.then.response (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/lib/http.js:441:30)
         at process._tickCallback (internal/process/next_tick.js:68:7)
     From: Task: WebDriver.createSession()
         at Function.createSession (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/lib/webdriver.js:769:24)
         at Function.createSession (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/chrome.js:761:15)
         at createDriver (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/index.js:170:33)
         at Builder.build (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-webdriver/index.js:642:16)
         at new module.exports (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-cucumber-js/runtime/chromeDriver.js:20:8)
         at getDriverInstance (/home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-cucumber-js/runtime/world.js:54:22)
         at /home/harshs/Documents/Programming/GoogleSearch/node_modules/selenium-cucumber-js/runtime/world.js:207:29

更早的时候,安装了chromedriver 2.41版本,并且遇到了同样的错误,因此我将chromedriver更新为2.46版本。 使用
sudo apt-get install google-chrome-stable
安装Chrome版本76

我试图搜索其他线程,而我发现的是尝试更新selenium-webdriver,我不知道该怎么做。

请帮助。

0 个答案:

没有答案