小编典典

Internet Explorer保护模式错误

selenium

我在Visual Studio中的代码正在使用Selenium Webdriver
2.24.0。我正在使用的测试框架是Nunit。我的代码工作得很好(加载差异浏览器,驱动网站)直到发布2.24.0版本。

我将新的IE独立服务器添加到我的项目中。

现在,每当我运行代码时,NUnit都会遇到此错误消息。

 FirstSeleniumTest.SeleniumTest.TestGoogle:
SetUp : System.InvalidOperationException : 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. (NoSuchDriver)
TearDown : System.NullReferenceException : Object reference not set to an instance of an object.

然后,命令提示符随即弹出。

Started InternetExplorerDriver server (64-bit)
2.24.0.0
Listening on port 50329

我在IE上禁用了保护模式。仍然没有运气。

如何使我的代码恢复正常的网络驱动?


阅读 578

收藏
2020-06-26

共1个答案

小编典典

您应确保为 所有
4个安全区域(Int​​ernet,本地Intranet,受信任的站点,受限制的站点)启用或禁用保护模式。换句话说,所有安全区域的设置值都应该相同。

2020-06-26