3
votes

I've been using ruby Mechanize for several years to do automated testing of the SaaS product we host. The site is using JS more and more, making maintenance of the Mechanize scripts nearly impossible. I've decided to try using WATIR-WebDriver instead. However, the login process requires a user certificate and password. I can't find any reference to using a cert like this.

1

1 Answers

2
votes

If you're using Chrome, you can ignore certificate errors by passing an command line option to the Chrome Driver:

b = Watir::Browser.new :chrome, :switches => ['--ignore-certificate-errors']

If you're using Firefox, try

profile = Selenium::WebDriver::Firefox::Profile.new
profile.assume_untrusted_certificate_issuer = true
b = Watir::Browser.new WEB_DRIVER, :profile => profile