Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in DevOps and Agile by (19.7k points)

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.

Thanks very much! Any suggestions will be appreciated!

1 Answer

0 votes
by (62.9k points)

There is no need for the custom profiles to deal with "Untrusted connection" on WebDriver, use the below code snippet to disable Firefox from raising a warning every time a connection uses an "untrusted" certificate:

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);

driver = new FirefoxDriver(capabilities);

Browse Categories

...