org.openqa.selenium.remote.SessionNotFoundException:Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones.

10 January, 2014
Sometimes when we are trying to load InternetExplorer from WebDriver we may get the below error :

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.39 seconds
Build info: version: '2.34.0', revision: '11cd0ef', time: '2013-08-06 17:11:28'
System info: os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_09'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver

This error is because of the security settings in IE. There is a permanent fix to this.

->Open IE , Go to -> Tools -> Security tab .
Now either check or uncheck the "Enable Protected Mode" checkbox for all zones i.e Internet , Local internet, Trusted Sites, Restricted Sites.



Now the scripts should run without any problem.

No comments:

Post a Comment