Unable to open IE11 driver instance using Selenium WebDriver with Java Unable to open IE11 driver instance using Selenium WebDriver with Java selenium selenium

Unable to open IE11 driver instance using Selenium WebDriver with Java


You cannot open IE browser instance if Protected Mode settings are not the same for all zones OR if the browser is zoomed.

  1. To resolve this, Open IE Browser and go to Internet Optionswindows.
  2. Click on Security tab and make sure 'Internet','LocalIntranet','Trusted sites' and 'Restricted sites' have 'EnableProtected Mode' either checked or unchecked for all options.
  3. Apply and save the settings and re-run the test code. It shouldwork.

Below workaround is provided which will help you to temporarily solve the problem.

DesiredCapabilities caps = DesiredCapabilities.internetExplorer();caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);WebDriver driver = new InternetExplorerDriver(caps); 

Note : If you don't have permission to change IE settings,Request you to contact your IT administrator to get the required changes done.

  • Protected Mode is an important step forward in security for Internet Explorer (IE), it helps protect users from attack by runningan IE process with greatly restricted privileges.
  • Protected Mode settings, like almost all other settings of IE, arestored in the Windows registry and are checked when the browser isinstantiated.
  • The driver needed a workaround for people who couldn't set those IEsettings because their machine was overly locked down and socapabiltity fetaure was introduced.
  • It simply bypasses the registry check. Using the capability doesn'tsolve the underlying problem though.
  • Unexpected hangs, element location not working, and clicks not being propagated, could result.
  • To help warn people of this potential problem, the capability wasgiven big scary-sounding names likeINTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS.
  • Ask your IT support to make the changes and if still using thecapability you are risking the stability of your code.


If u are behind proxy with no access provision to change the protected mode settings then use this capabilities

DesiredCapabilities cap = DesiredCapabilities.internetExplorer();        cap.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);

this will introduce some flakiness