Unexpected error launching Internet Explorer. Protected Mode must be set to the same value
When we try to launch IE using WebDriver on very first time on a fresh computer by using this code
1 2 | WebDriver driver = new InternetExplorerDriver(); driver.get("http://abodeqa.com"); |
Then we filled with amazement when we find this exception
1 2 3 4 5 6 7 8 9 10 11 12 13 | org.openqa.selenium.WebDriverException: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (WARNING: The server did not provide any stacktrace information) System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_25' Driver info: driver.version: <a title="Everything you wanted to know about the Internet Explorer driver" href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver">InternetExplorerDriver</a> 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:131) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:105) at org.openqa.selenium.remote.<a title="Information about the RemoteWebDriver" href="https://code.google.com/p/selenium/wiki/RemoteWebDriver">RemoteWebDriver</a>.execute(<a title="Information about the RemoteWebDriver" href="https://code.google.com/p/selenium/wiki/RemoteWebDriver">RemoteWebDriver</a>.java:409) at org.openqa.selenium.remote.<a title="Information about the RemoteWebDriver" href="https://code.google.com/p/selenium/wiki/RemoteWebDriver">RemoteWebDriver</a>.startSession(<a title="Information about the RemoteWebDriver" href="https://code.google.com/p/selenium/wiki/RemoteWebDriver">RemoteWebDriver</a>.java:103) at org.openqa.selenium.ie.<a title="Everything you wanted to know about the Internet Explorer driver" href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver">InternetExplorerDriver</a>.setup(<a title="Everything you wanted to know about the Internet Explorer driver" href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver">InternetExplorerDriver</a>.java:104) at org.openqa.selenium.ie.<a title="Everything you wanted to know about the Internet Explorer driver" href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver">InternetExplorerDriver</a>.<init>(<a title="Everything you wanted to know about the Internet Explorer driver" href="https://code.google.com/p/selenium/wiki/InternetExplorerDriver">InternetExplorerDriver</a>.java:61) |
On seeing the exception message we normally come to know the root of this exception and after a few minutes of search …