Chrome shutdown 报错,chromedriver启动失败解决方法(selenium)

使用Chrome执行测试脚本时遇到ChromeDriver初始化失败的问题,错误信息显示为Failed to initialize connection。问题根源在于ChromeDriver版本与Chrome浏览器版本不匹配。解决方法是下载与当前Chrome浏览器版本相匹配的ChromeDriver,确保两者兼容,从而成功启动测试。
摘要由CSDN通过智能技术生成

一、问题描述

换成chrome浏览器,执行测试脚本,报如下错误

[0.000][INFO]:      ChromeDriver 23.0.1240.0 E:\workspace\testng\res\chromedriver.exe
[0.748][FINE]:      Initializing session with capabilities {
   "browserName": "chrome",
   "goog:chromeOptions": {
      "args": [  ],
      "extensions": [  ]
   }
}

[0.749][INFO]:      Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --enable-logging --log-level=1 --disable-hang-monitor --disable-prompt-on-repost --dom-automation --full-memory-crash-report --no-default-browser-check --no-first-run --disable-background-networking --disable-sync --disable-translate --disable-web-resources --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --ignore-certificate-errors about:blank
[45.759][SEVERE]:   Failed to initialize connection
[55.894][WARNING]:  Chrome still running, terminating...
[55.894][INFO]:     Chrome shutdown

二、问题原因及解决办法

chromedriver版本不匹配,下载当前浏览器版本一致的chromedriver

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值