一、问题描述
换成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