How can I handle Untrusted SSL certificate in Firefox using Selenium WebDriver?

How can I handle Untrusted SSL certificate in Firefox using Selenium WebDriver?

Hi Brett,

You can handle Untrusted SSL Certificates in Firefox browser by using Firefox profile:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;

public class SSLCertificate {

public static void main(String[] args) {

//It create firefox profile
FirefoxProfile profile=new FirefoxProfile();

// This will set the true value
profile.setAcceptUntrustedCertificates(true);

// This will open  firefox browser using above created profile
WebDriver driver=new FirefoxDriver(profile);

driver.get("pass the url as per your requirement");}