Intermittent IE driver errors resolution for Test Automation Engineers
If you are working as Automation Engineer since long like me, You might agree with the fact that test script execution on IE browser sometimes can be a real pain. Mostly due to various execution issues you are facing.. Btw these are not due to script but due to IE driver.
In order to resolve them efficiently you need to know which compatibility setting needs to be applied for which case. Let's talk about that in this article.
- Test Failures due to IE zoom setting:
This is the most common issue faced while executing any Selenium test on IE browser. By default IE needs zoom level to set at 100%. If it's not you ll get browser zoom compatibility issues. When you are running the test in parallel mode or in CI/CD pipeline in cloud. You really don't have an option to go ahead manually set the IE zoom to 100% on every server. so it's a waste of time and not truly serving the purpose of pipeline automation.
To resolve this you can ignore the browser zoom setting by calling the IE compatibility options like below:
DesiredCapabilities caps = DesiredCapabilities.internetExplorer(); caps.setCapability("ignoreZoomSetting", true);
driver = new InternetExplorerDriver(caps);
2. Test Failures due to unexpected IE popup during execution
This is the most common problem faced mostly when you are executing large chunks of test case on IE in parallel execution mode. To resolve that try below solution:
DesiredCapabilities caps = DesiredCapabilities.internetExplorer(); caps.setCapability("disable-popup-blocking", true);
driver = new InternetExplorerDriver(caps);
3. Selenium click() method is not working in IE (Especially IE11).
I faced this problem recently suddenly click() method is not working when I was executing my tests in IE11. I tried the IE driver update but that does not work. Best solution which worked for me is Setting attribute nativeEvents to false enable click button in IE. It will disable IE browsers native elements. As far as i know ,native elements i.e. disabling java script that usually present on the click events.
DesiredCapabilities caps = DesiredCapabilities.internetExplorer(); caps.setCapability("nativeEvents",false); driver = new InternetExplorerDriver(caps);
4. Unable to Launch IE driver due to Security issues:
This is the most common issue which you are facing as your security Administrator blocks some of the settings of IE driver to resolve this try below:
DesiredCapabilities caps = DesiredCapabilities.InternetExplorer(); caps.SetCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
driver = new InternetExplorerDriver(caps);
That's it for this article. Do let me know in the comments section if that helps.