What is the problem?
How to Handle untrusted SSL certificates using selenium webdriver?
Solution:
When this appears?
If the site has a security certificate, but it is wrong / outdated, then Firefox will warn you that someone might be trying to deceive you. You can bypass the message by clicking the “Add an exception” button, and then retrieving the certificate and viewing it.
import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.internal.ProfilesIni; public class testHandleFireFoxcertificatesIssue { public static void main(String[] args) { //Class ProfilesIni details -> http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html ProfilesIni allProfiles = new ProfilesIni(); //Class FirefoxProfile -> http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html // Use FirefoxProfile Constructor FirefoxProfile myProfile = allProfiles.getProfile("CertificateIssue"); myProfile.setAcceptUntrustedCertificates(true); myProfile.setAssumeUntrustedCertificateIssuer(false); WebDriver myDriver = new FirefoxDriver(myProfile); myDriver.get("http://www.paypal.com"); } }