Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
519 views
by Contributing Tester (92 points)
edited by

I am working on a case study to automated basic flows using all languages with Selenium like Ruby, C#, Python. etc.

 

With Ruby I am getting connection not secure error

Code

@profile = Selenium::WebDriver::Firefox::Profile.new
@profile.assume_untrusted_certificate_issuer=false
@profile.secure_ssl = true
driver = Watir::Browser.new :firefox, :profile => @profile
driver.goto "https://www.google.com/"

It fails at last due to "Your connection is not secure"

Failure: test[C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.1.0/lib/selenium/webdriver/remote/response.rb:32]: Selenium::WebDriver::Error::UnknownError: 

2 Answers

0 like 0 dislike
by
selected by
 
Best answer

Try below steps:

  1. Import the certificate into a sample firefox-profile
  2. Copy the cert8.db to the users you want equip with the certificate.

So, first import the certificate by hand into the firefox profile of the sample-user.

Then copy as give below

  • On (Linux/Unix) : /home/${USER}/.mozilla/firefox/${randomalphanum}.default/cert8.db
  • On Windows: %userprofile%\Application Data\Mozilla\Firefox\Profiles\%randomalphanum%.default\cert8.db
0 like 0 dislike
by The go-to Tester (181 points)
This used to be a knows issue. Update your Firefox and Gekodriver. It should resolve your issue. If not, let us know.
...