Configure capybara to trust all SSL certificates

I'm having trouble getting Capybara (1.1.1) to automatically validate SSL certificates in Chrome.

This is my current Capybara configuration.

Capybara.run_server = false
Capybara.app_host = 'http://some.host.com'
Capybara.default_driver = :selenium

Capybara.register_driver :selenium do |app|
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
end

I read about the -trustAllSSLCertificates flag, but I'm not sure how to apply this when starting Selenium using Capybara.

+5
source share
1 answer

This will do it using firefox:

  Capybara.register_driver :selenium do |app|
    profile = Selenium::WebDriver::Firefox::Profile.new
    profile.assume_untrusted_certificate_issuer = false
    Capybara::Selenium::Driver.new(app, :profile => profile)
  end
-1
source

All Articles