In this tutorial we will discuss about Fixing the issues that arises during execution of Selenium WebDriver tests against the browser Type Internet Explorer. Before Running Tests, make sure the following settings are updated for the Internet Explorer.
Browser Zoom Level
Access File Menu->View->zoom
should be set to 100%.
Protected Mode Settings
Access File Menu->Tools-> Internet Options->Security
.
Make sure the Protected Mode is enabled or disabled for all the Security Zones as listed below:
- Internet Zone
- Local intranet
- Trusted Sites
- Restricted Sites
Executable File
Add the IEDriverServer.exe
to the eclipse project by downloading from the link https://www.seleniumhq.org/download/
Untrusted SSL Certificate
To Handle the SSL Certificates on IE Browsers use the following code snippet to Handle SSL Certificates. This logic clicks on the link Continue to this website(recommended)
driver.navigate().to(“javascript:document.getElementById(‘overridelink’).click()”);
Selenium WebDriver Program:
Conclusion
Therefore, setting the zoom to 100% and enabling or disabling the protected mode for all the security zones resolves the SessionNotCreatedError
.