This option will work around the problem, but introduce some subtle problems. Have you configured IE protected modes correctly? This is the right decision.
The guide to this life is here:
https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver
Essentially, just disable protected mode in IE for each zone.
Alternatively, if you really have to use the override function, then you are either doing two things:
Use the InternetExplorerOptions class. Pay attention to the name of the property, this gives you a big key, and it is not very good to use.
var options = new InternetExplorerOptions; options.IntroduceInstabilityByIgnoringProtectedModeSettings = true; var driver = new InternetEplorerDriver(options);
or use RemoteWebDriver, which can accept any implementation of the ICapabilities interface that DesiredCapabilites implements:
var capabilities = new DesiredCapabilities("internet explorer", string.Empty, new Platform(PlatformType.Windows)); capabilities.SetCapability("ignoreProtectedModeSettings", true); var webDriver = new RemoteWebDriver(capabilities);
Arran source share