I’m trying to instantiate an InternetExplorerDriver in C#, and every time I do I get the following error message:
System.InvalidOperationException : Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones. (NoSuchDriver)
Now I’m not sure how to sort this out, but the line of code that triggers the error in question is:
IWebDriver driver = new InternetExplorerDriver();
The documentation for InternetExplorerDriver suggests that I can pass in an ICapabilities object in an overloaded constructor, but that only has the properties BrowserName, IsJavaScriptEnabled, Platform and Version. None of these seem to suggest that they can solve the issue.
Is there something I need to do within the implementation to sort this out?
Or do I have to modify some settings within IE9 itself?
Internet Explorer defines four zones, each with a different security level and the ability to enable or disable Protected Mode. The error message is trying to tell you that Protected Mode must either be disabled or enabled for all zones because of a limitation in Selenium’s
InternetExplorerDriver.For more details, see the defect report in Selenium’s issue tracker and the screenshot of Internet Explorer security options.