Ruby 错误::SessionNotCreatedError:启动Internet Explorer时发生意外错误
无法使用“我的脚本”启动Internet Explorer,这会导致此错误Ruby 错误::SessionNotCreatedError:启动Internet Explorer时发生意外错误,ruby,automation,cucumber,internet-explorer-11,watir,Ruby,Automation,Cucumber,Internet Explorer 11,Watir,无法使用“我的脚本”启动Internet Explorer,这会导致此错误 Selenium::WebDriver::Error::SessionNotCreatedError: 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 (enabl
Selenium::WebDriver::Error::SessionNotCreatedError: 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.
我为此做了大量研究,并找到了一些解决方案,但我无法更改IE浏览器设置,此处所有区域都禁用了“启用保护模式”复选框
此外,尝试使用所需的功能覆盖此代码,但未获得任何成功:
caps = Selenium::WebDriver::Remote::Capabilities.internet_explorer(
:ignoreProtectedModeSettings => true,
:javascriptEnabled => true,
)
Watir::Browser.new :ie, http_client: client,:desired_capabilities => caps
我正在使用Cucumber与Ruby和Watir,浏览器是InternetExplorer11
请对此提出一些解决方法。在对其进行持续研究后,问题得到解决
PowerShell脚本
对其进行编辑的方法,并找到了一些从Microsoft power shell脚本存储库重置Internet Explorer首选项的解决方案
可能其中一个安全区域启用了保护模式。我建议您再次检查所有区域,并尝试禁用它。如果问题仍然存在,则您可以尝试与系统管理员联系以帮助您修改。问题已得到解决,首先我尝试通过编辑特定于浏览器选项的注册表来修复它,但我也没有权限。然后我尝试了一种使用脚本来修改它的方法,并找到了一个参考“powershell”脚本来从这里修改它,在脚本中进行了一些调整之后,它就工作了:DThanks用于共享该问题的解决方案。我建议你将你的答案作为这个帖子的答案,并尝试在48小时后将你自己的答案标记为这个问题的可接受答案。它可以在未来帮助其他社区成员解决类似的问题。谢谢你的理解我做到了!!谢谢@Deepak msfta如果可以,你也可以尝试接受它作为答案。