Untrusted Certificates Force Ruby Selenium

0 votes

I'm running ruby-rspec with selenium and capybara. When I navigate to the app host I'm getting an InsecureCertificateError in the browser.

How do I load a profile into selenium so that it will ignore the untrusted certificates? Below is my code:

Capybara.register_driver :selenium do |app|

  profile = Selenium::WebDriver::Firefox::Profile.new

  profile.assume_untrusted_certificate_issuer=false

  Capybara::Selenium::Driver.new(app, browser: :firefox, profile: profile)

end

May 9, 2018 in Selenium by Martin
• 4,220 points
232 views

1 answer to this question.

0 votes

Check this out

capabilities = Selenium::WebDriver::Remote::W3C::Capabilities.firefox(accept_insecure_certs: true)

driver = Selenium::WebDriver.for :firefox, desired_capabilities: :capabilities

Also see this selenium docs

answered May 9, 2018 by Samarpit
• 5,130 points

Related Questions In Selenium

0 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How can I handle certificates when testing pages with Selenium?

In Firefox, you should set 'accept_untrusted_certs' of ...READ MORE

answered May 8, 2018 in Selenium by king_kenny
• 3,650 points
3,924 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
976 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,131 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
874 views
0 votes
1 answer

How to login a forum using Selenium with Python

You should try to directly log in ...READ MORE

answered Apr 27, 2018 in Selenium by Samarpit
• 5,130 points
346 views
0 votes
1 answer

Selenium grid 2 in chrome browser

The problem is in -Dwebdriver arguments. Maybe you should do ...READ MORE

answered Apr 27, 2018 in Selenium by Samarpit
• 5,130 points
278 views