OS: windows 7
Selenium Version:
3.3.0
Browser:
firefox 52
-->
Browser Version:
firefox 52
code like below:
@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"
pls. see below:
assert_ok' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/response.rb:32:ininitialize' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/http/common.rb:83:in new' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/http/common.rb:83:increate_response' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/http/default.rb:107:in request' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/http/common.rb:61:incall' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/w3c_bridge.rb:620:in execute' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/remote/w3c_bridge.rb:126:inget' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/selenium-webdriver-3.3.0/lib/selenium/webdriver/common/navigation.rb:32:in to' C:/RailsInstaller/Ruby2.1.0/lib/ruby/gems/2.1.0/gems/watir-6.2.0/lib/watir/browser.rb:78:ingoto'
Pls. help to fix.
BTW: if using python , selenium 3.3.1, the above issue doesn't occur. pls. see below
driver = webdriver.Firefox()
driver.get("https://www.google.com/")
Profile settings don't have effect on Firefox 52 (I assume you use GeckoDriver).
What do you try to achieve using the profile options?
@p0deje Yes , I used GeckoDriver.
I want to open "https://www.google.com" successfully without encountering any security issue, pls. see the attached

So why do you change profile then? Just use plain driver:
driver = Selenium::WebDriver.for(:firefox)
driver.get 'https://google.com'
@p0deje
With your post, I still got the same error.
Have you tried ?
I did, it loads fine.
I think this is something on your side - ISP issue, website blocking, etc.
Can you open it correctly when using Firefox manually?
what about your firefox version?
when I manully open firefox, I got the following

Ok, so this is definitely something wrong on your side. There might be many reasons for this, so I suggest you to Google it.
Closing this as not a Selenium issue.
But I can successfully open with python code: if using python , selenium 3.3.1, pls. see below
driver = webdriver.Firefox()
driver.get("https://www.google.com/")
This is definitely selenium issues for ruby
when I manully open firefox, I got the following
You say that if you open browser manually and open Google, you still see an error. How is that Selenium Ruby issue?
WHen I manully open google, I can click advanced button to add exception and then google search shows
Can you tell me how to bypass "adding exception" in ruby ?
I don't need to by pass using python.
so for ruby , I tried to create a new profile like below to by pass
@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/"
but it still can't work
Try this:
caps = Selenium::WebDriver::Remote::Capabilities.firefox
caps['acceptInsecureCerts'] = true
driver = Selenium::WebDriver.for(:firefox, desired_capabilities: caps)
browser = Watir::Browser.new(driver)
Ok let me try
This is working, thank you very much for your help
Most helpful comment
Try this: