How To Handle SSL Certificate Error In IE Browser For Selenium WebDriver Test?

When i see SSL certificate error In IE browser, my screen shows me a error: "There is problem with this website's security certificate."

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

1 Answer

answered by (151 points)
0 votes

You can avoid above error by simply accepting all SSL using DesiredCapabilities


DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
WebDriver driver = new InternetExplorerDriver(capabilities);
In case of above code does not work, you can even try clicking on 
Continue to this Website (not recommended)
You can try below code:
driver.navigate ().to ("javascript:document.getElementById('overridelink').click()");
Hope that answered!