Webdriverio:更新谷歌浏览器后出错

时间:2017-11-21 16:31:49

标签: javascript node.js google-chrome selenium-chromedriver webdriver-io

将Google Chrome更新到版本62后,当我尝试功能测试时出现此错误:

 Uncaught Error: disconnected: unable to connect to renderer
  at new RuntimeError (node_modules/webdriverio/build/lib/utils/ErrorHandler.js:144:12)
  at Request._callback (node_modules/webdriverio/build/lib/utils/RequestHandler.js:313:39)
  at Request.self.callback (node_modules/request/request.js:186:22)
  at Request.<anonymous> (node_modules/request/request.js:1163:10)
  at IncomingMessage.<anonymous> (node_modules/request/request.js:1085:12)
  at endReadableNT (_stream_readable.js:974:12)
  at _combinedTickCallback (internal/process/next_tick.js:80:11)
  at process._tickDomainCallback (internal/process/next_tick.js:128:9)

我尝试更新Chrome驱动程序,但徒劳无功。

有我的依赖:

{
  "name": "TEST",
  "version": "1.0.0",
  "description": " TESTs",
  "main": "config.js",
  "author": "Mohammad TRABELSI",
  "license": "ISC",
  "devDependencies": {
    "chromedriver": "2.33",
    "mocha": "3.2.0",
    "mocha-junit-reporter": "^1.13.0",
    "selenium-webdriver": "3.6.0",
    "webdriver-manager": "^11.1.1",
    "webdriverio": "^4.6.2",
    "json": "^9.0",
    "minimist": "^1.2",
    "node-uuid": "^1.4",
    "parsed-url": "0.0.0",
    "q": "^1.4",
    "req": "^0.1",
    "should": "^9.0",
    "window": "^1.0"
  },
  "dependencies": {
    "log4js": "^1.1.1"
  }
}

有什么帮助吗?

1 个答案:

答案 0 :(得分:0)

解决方案是:

  • 下载最新版本的 Chrome驱动程序 - chromedriver_linux64.zip - (2.33)并将其放入项目根目录。
  • webdriver.io 更新为最新版本4.9.9。
  • 下载最新版本的 selenium服务器 selenium-server-standalone-3.7.1.jar

这项工作适用于Google Chrome 62