在Ubuntu 16.04上,Chrome版本:谷歌Chrome 52.0.2743.82(官方版本)(64位)
执行selenium / chrome代码时,我会获得chrome对话框来解锁密钥环。结果是selenium代码抛出异常
org.openqa.selenium.remote.UnreachableBrowserException:与远程浏览器通信时出错。它可能已经死了
从Chrome驱动程序日志(通过--verbose命令收集)我看到以下
[INFO]:启动Chrome:/ opt / google / chrome / google-chrome --disable-background-networking --disable-client-side-phishing-detection --disable-component-update --disable-default -apps --disable-hang-monitor --disable-popup-blocking --disable-prompt-on-repost --disable-sync --disable-web-resources --enable-logging --ignore-certificate-errors - -kiosk-printing --load-extension = / tmp / .com.google.Chrome.JxYclx / extension_ockefobfkeddeiaoonaadekgljdlkbim,/ tmp / .com.google.Chrome.JxYclx / internal --log-level = 0 --metrics-recording- only --no-first-run --password-store = basic --remote-debugging-port = 12294 --safebrowsing-disable-auto-update --safebrowsing-disable-download-protection --start-maximized --test -type = webdriver --use-mock-keychain --user-data-dir = / tmp / dll / mydir
这是我在chromedriver日志文件中看到的对话框出现时的内容
[75.725][INFO]: Waiting for pending navigations...
[75.725][INFO]: Done waiting for pending navigations
[75.745][INFO]: Waiting for pending navigations...
[375.779][SEVERE]: Timed out receiving message from renderer: 299.188
[375.779][INFO]: Timed out. Stopping navigation...
[385.781][SEVERE]: Timed out receiving message from renderer: 10.000
[385.781][INFO]: Done waiting for pending navigations
[385.781][INFO]: RESPONSE ClickElement timeout: Timed out receiving message from renderer: 10.000
(Session info: chrome=53.0.2785.89)
[454.310][INFO]: COMMAND ClickElement {
"id": "0.4153012592029841-13"
}
有趣的部分是我有时会在登录页面上获取对话框,有时在其他没有密码字段的页面上 - 它似乎是完全随机的,并且不会发生所有带/不带密码的页面。