Reputation: 35
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.
Upvotes: 1
Views: 8044
Reputation: 71
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.
require 'rubygems'
require 'selenium-webdriver'
$RC_URL = 'http://localhost:4444/wd/hub'
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
capabilities["browser"] = "chrome"
end
$driver = Selenium::WebDriver.for(:remote,
:url => $RC_server,
:desired_capabilities => capabilities)
$driver.navigate.to "http://www.google.com"
Upvotes: 0
Reputation: 6660
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.
Upvotes: 1