Selenium Web驱动程序:DevTools请求失败 - 尝试打开chrome驱动程序时

时间:2017-07-20 14:14:07

标签: java google-chrome selenium-webdriver selenium-chromedriver

当我尝试通过selenium web驱动程序打开chrome浏览器时,有时它没有打开,我收到错误日志。 它不是一直随机发生的,我使用了最新版本的selenium web驱动程序和镀铬驱动程序,适合最新的硒版本。

[0.685][INFO]: Launching chrome: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-background-networking --disable-client-side-phishing-detection --disable-default-apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-automation --enable-logging --force-fieldtrials=SiteIsolationExtensions/Control --ignore-certificate-errors --load-component-extension="C:\Users\T002812\AppData\Local\Temp\scoped_dir8344_11442\internal" --log-level=0 --metrics-recording-only --no-first-run --password-store=basic --remote-debugging-port=12855 --safebrowsing-disable-auto-update --test-type=webdriver --use-mock-keychain --user-data-dir="C:\Users\T002812\AppData\Local\Temp\scoped_dir8344_1252" data:,
[0.733][DEBUG]: DevTools request: http://localhost:12855/json/version
[2.839][DEBUG]: DevTools request failed
[2.889][DEBUG]: DevTools request: http://localhost:12855/json/version
[3.031][DEBUG]: DevTools request failed
[3.081][DEBUG]: DevTools request: http://localhost:12855/json/version
[4.894][DEBUG]: DevTools request failed
[4.944][DEBUG]: DevTools request: http://localhost:12855/json/version
[5.084][DEBUG]: DevTools request failed
[5.134][DEBUG]: DevTools request: http://localhost:12855/json/version
[6.952][DEBUG]: DevTools request failed
[7.002][DEBUG]: DevTools request: http://localhost:12855/json/version
[7.143][DEBUG]: DevTools request failed
[7.193][DEBUG]: DevTools request: http://localhost:12855/json/version
[9.007][DEBUG]: DevTools request failed
[9.057][DEBUG]: DevTools request: http://localhost:12855/json/version
[9.199][DEBUG]: DevTools request failed
[9.249][DEBUG]: DevTools request: http://localhost:12855/json/version
[11.062][DEBUG]: DevTools request failed
[11.113][DEBUG]: DevTools request: http://localhost:12855/json/version
[11.254][DEBUG]: DevTools request failed
[11.305][DEBUG]: DevTools request: http://localhost:12855/json/version
[13.116][DEBUG]: DevTools request failed
[13.167][DEBUG]: DevTools request: http://localhost:12855/json/version
[13.308][DEBUG]: DevTools request failed
[13.359][DEBUG]: DevTools request: http://localhost:12855/json/version
[15.167][DEBUG]: DevTools request failed
[15.218][DEBUG]: DevTools request: http://localhost:12855/json/version
[15.359][DEBUG]: DevTools request failed
[15.410][DEBUG]: DevTools request: http://localhost:12855/json/version
[17.214][DEBUG]: DevTools request failed
[17.264][DEBUG]: DevTools request: http://localhost:12855/json/version
[17.413][DEBUG]: DevTools request failed
[17.464][DEBUG]: DevTools request: http://localhost:12855/json/version
[19.268][DEBUG]: DevTools request failed

[62.397][INFO]: RESPONSE InitSession chrome not reachable
[62.397][DEBUG]: Log type 'driver' lost 0 entries on destruction
[62.397][DEBUG]: Log type 'browser' lost 0 entries on destruction

1 个答案:

答案 0 :(得分:-1)

原因可能在于代理的Chrome隐私保护。 要将其停用,请参阅:https://www.expressvpn.com/support/troubleshooting/google-chrome-no-proxy/