Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching Internet Explorer.
Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same
value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.30 seconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'del1-dhp-28439', ip: '169.254.46.169', os.name: 'Windows 7', os.arch:
'amd64', os.version: '6.1', java.version: '1.7.0'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
	at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:164)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:242)
	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:227)
	at org.openqa.selenium.ie.InternetExplorerDriver.run(InternetExplorerDriver.java:182)
	at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:174)
	at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:146)
	at AdminConsoleTests.testApp(AdminConsoleTests.java:30)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

You might have seen this error while executing your WebDriver script on Internet Explorer browser. Here I would explain you that how to fix this issue.

wecanFix

Steps to fix this issue :

1. Go to Internet Explorer browser settings and click on Internet options.

Protected_mode_1

2. Once you click on “Internet options“, it opens up a pop up where you will see a Security tab on the top. Just click on it.

3. Under “security tab”, there is a section called Select a zone to view or change security settings with 4 options :

  • Internet
  • Local Intranet
  • Trusted Sites
  • Restricted Sites

Protected_mode_2
4. Click on First option and you will see “Enable protected mode” check box at the bottom. Just mark it as checked, if it is already checked then leave it and move to second option and again you will see the same check box at the bottom. You have to check this particular check box for all 4 options.

Protected_mode_3

5. Once you done with the above settings, now is the time to execute your WebDriver script on Internet Explorer browser and this time your script will work on IE browser.

I hope the steps provided above will help you in resolving this particular issue. Good Luck !! 🙂

If you really like the information provided above, please don’t forget to like us on Facebook, you can also leave the comment.

Leave a Reply

Your email address will not be published. Required fields are marked *