IE Protected Mode for Local System Account

前端 未结 4 1956
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-05 19:54

I have a Windows Service that runs a Team City Build agent on a Windows 7 OS.

This agent triggers NUnit tests which use the Selenium IE web drivers to execute a seri

4条回答
  •  长发绾君心
    2021-01-05 20:34

    There is a setting on the IE WebDriver that tells it to ignore the protected mode settings. Judging by the name of the setting it might introduce some "instability", but I've had no problems with this approach:

    var options = new InternetExplorerOptions();
    // avoid the "Protected Mode must be set to the same value (enabled or disabled) for all zones" error
    options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
    return new InternetExplorerDriver(options);
    

提交回复
热议问题