Start IEDriver with the latest Selenium

Blog-image

      Recently, one of my colleagues encountered an issue in Internet Explorer during the automation using the latest selenium (3.141.59). Issue related to interacting web objects in IE. Driver instantiation was successful but failed to do actions in the web objects. Later, found a solution to solve this issue with the help of setting different capabilities especially ignoreProtectedModeSettings as true. Following latest IE driver initiation logic which solved the above issue,

WebDriver driver;
InternetExplorerOptions ieCapabilities = new InternetExplorerOptions();
ieCapabilities.setCapability(“nativeEvents”, false);
ieCapabilities.setCapability(“unexpectedAlertBehaviour”, “accept”);
ieCapabilities.setCapability(“ignoreProtectedModeSettings“, true);
ieCapabilities.setCapability(“disable-popup-blocking”, true);
ieCapabilities.setCapability(“enablePersistentHover”, true);
ieCapabilities.setCapability(“ignoreZoomSetting”, true);

InternetExplorerDriverService service = new InternetExplorerDriverService.Builder()
.usingDriverExecutable(new File(“path to your IEDriverServer.exe”))
.usingAnyFreePort().build();
driver = new InternetExplorerDriver(service, ieCapabilities);

Please try to use the above code snippet from your end if you are facing the same kind of issue.

make it perfect!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com

Up ↑

%d bloggers like this: