'profile.assume_untrusted_certificate_issuer = false not working for me

Using watir-webdriver for automation I'm not able to handle Firefox "Untrusted Connection" . Already tried this:

 require 'watir-webdriver'
 profile = Selenium::WebDriver::Firefox::Profile.new
 profile.assume_untrusted_certificate_issuer = false
 browser = Watir::Browser.new(:firefox, :profile => profile)
 browser.goto("http://xxx.xxx.xxx.com)

Still got the same result ? Any help would be appreciated...



Solution 1:[1]

This worked for me :

   @profile=Selenium::WebDriver::Firefox::Profile.from_name "default"
   @profile.assume_untrusted_certificate_issuer=false
   @profile.secure_ssl = true 
   browser = Watir::Browser.new :firefox, :profile => @profile

Solution 2:[2]

Capabilities help me:

capabilities = Selenium::WebDriver::Remote::Capabilities.firefox(accept_insecure_certs: true)
$driver = Selenium::WebDriver.for :firefox, desired_capabilities: capabilities

geckodriver 0.14.0, Mozilla Firefox 52.0, selenium-webdriver 3.2.1

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mandy
Solution 2 lojza