“--忽略证书错误”开关不适用于 Chrome 15
我在自动化 Chrome 15 时遇到问题。
如果我使用 --ignore-certificate-errors
开关从 ruby 脚本启动 Chrome,我仍然会收到证书错误提示。
我使用下一个命令启动 chrome
browser = Watir::Browser.new :chrome, :switches => ['--ignore-certificate-errors']
它在 Chrome 14 中按预期工作。 Watir-webdriver gem 版本是 0.3.8 如果我执行
C:\Users\test\AppData\Local\Google\Chrome\Application\chrome --ignore-certificate-errors
一切都按预期工作。
目前我将降级到 Chrome 14,但如果您能提供 Chrome 15 的解决方案,我将不胜感激。
I have an issue with automating Chrome 15.
If I start Chrome from ruby script with --ignore-certificate-errors
switch, I still get certificate error prompt.
I start chrome with next command
browser = Watir::Browser.new :chrome, :switches => ['--ignore-certificate-errors']
It works as expected with Chrome 14.
Watir-webdriver gem version is 0.3.8
If i execute
C:\Users\test\AppData\Local\Google\Chrome\Application\chrome --ignore-certificate-errors
Everything works as expected.
Currently I will downgrade to Chrome 14, but will be appreciate for solution for Chrome 15.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
作为解决方法,我建议也许只是将自签名证书添加到测试系统上的受信任授权列表中,这样您就不会收到错误。这为您提供的体验与真实用户使用来自可信机构的正确签名的证书访问生产站点时所看到的体验类似。
它还会让您在 IE 中遇到相同的错误屏幕,该屏幕没有任何开关可以绕过该错误,而且 IE 似乎会阻止 webdriver 执行任何自动化操作,因此您甚至无法对其进行编码以单击链接继续操作无论如何,该页面。
As a workaround, I'd suggest perhaps just adding the self signed certs to the list of trusted authories on the test systems so that you don't get the error. That gives you an experience that would parallel what a real user see's when accessing a production site with a properly signed cert from a trusted authority.
It also gets you past the same error screen in IE, for which there is no switch to bypass the error and for which it seems IE blocks webdriver from doing any automation, so you can't even code it to click the link to proceed to the page anyway.
对此的唯一答案是让 Selenium/Webdriver 项目来修复它。
建议的解决方案根本没有帮助,即使没有指定开关,webdriver 也会自动加载该开关。
错误消息的结果如下。请注意,指定了 0 个开关。
The only answer to this is to get the Selenium/Webdriver project to fix it.
The solution suggested wouldn't help at all, webdriver is automatically loading that switch, even when no switches are specified.
The following results in the error message. Notice that 0 switches are specified.