Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Firefox's untrusted connection warning using Selenium?

Tags:

Trying to find a way to disable Firefox from raising a warning every time a connection uses an "untrusted" certificate, with Selenium. I believe that the kind of solution that would work the best would be to set one of the browser preferences.

like image 785
Juan Carlos Coto Avatar asked Jun 02 '13 03:06

Juan Carlos Coto


People also ask

How does selenium handle untrusted certificates?

Handle Untrusted Certificate SeleniumStep 1-We have to create FirefoxProfile in Selenium. Step 2- We have some predefined method in Selenium called setAcceptUntrustedCertificates() which accept Boolean values(true/false)- so we will make it true. Step 3-Open Firefox browser with the above-created profile.

Can we resolve the SSL certificate issue in selenium?

SO to resolve this issue, we can create a Firefox profile manually, and after that, we can use the same profile with our selenium webdriver.


1 Answers

Just found this from the Mozilla Foundation bug link and it worked for me.

caps.setCapability("acceptInsecureCerts",true) 
like image 111
Dominic Giallombardo Avatar answered Sep 24 '22 14:09

Dominic Giallombardo