简体   繁体   English

启动 Internet Explorer 时出现意外错误。 IELaunchURL() 使用 IEDriverServer v3.150.1 返回 HRESULT 80070005(“访问被拒绝。”)

[英]Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070005 ('Access is denied.') using IEDriverServer v3.150.1

When I try to run the protractor scripts using IEWebdriver3.150 am getting Access denied Error as:当我尝试使用 IEWebdriver3.150 运行 protractor 脚本时,出现 Access denied 错误:

Error:
E/launcher - Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070005 ('Access is denied.') for URL 'http://localhost:40744/'

I tried to create a Registry FEATURE_BFCACHE and Enable Protected Mode enabled in all security Zones and browser zoom set to 100 %.我尝试创建一个注册表 FEATURE_BFCACHE 并在所有安全区域中启用启用保护模式并将浏览器缩放设置为 100%。

  • Node Version: v14.16.1 ( Tried Latest Version as well)节点版本:v14.16.1(也尝试过最新版本)
  • Protractor: 7.0.0 Protractor:7.0.0
  • Selenium: 3.141.59 Selenium:3.141.59
  • IE Web Driver:- 3.150.1 IE Web 驱动程序:- 3.150.1

Configuration:配置:

multiCapabilities: {
            'browserName': 'internet explorer',
            'ignoreProtectedModeSettings': true,
            'platform': 'Windows',
            'version': '11',
            'browserVersion': '11',
            'unexpectedAlertBehaviour': 'accept',
            'ignoreZoomSetting': true,
            'ie.ensureCleanSession': true,
             'maxInstances': 4
        }

This error message...此错误消息...

Error: E/launcher - Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070005 ('Access is denied.') for URL 'http://localhost:40744/'

...implies that the IEDriverServer was unable to initiate/spawn a new WebBrowsing Session ie browser session. ...意味着IEDriverServer无法启动/生成新的WebBrowsing Session器浏览器 session。


This issue is generally observed due to incorrect Protected Mode settings由于保护模式设置不正确,通常会观察到此问题

Protected Mode保护模式

On Internet Explorer 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value.在 Windows Vista 或 Windows 7 上的 Internet Explorer 7 或更高版本上,您必须将每个区域的保护模式设置设置为相同的值。 The value can be on or off, as long as it is the same for every zone.该值可以打开或关闭,只要每个区域都相同。 To set the Protected Mode settings you have to choose "Internet Options" from the "Tools" menu and then click on the Security tab .要设置保护模式设置,您必须从“工具”菜单中选择“Internet 选项”,然后单击“安全”选项卡 For each zone, there will be a check box at the bottom of the tab labeled Enable Protected Mode .对于每个区域,标签底部都有一个标记为Enable Protected Mode的复选框。

保护模式设置

@JimEvans in his article You're Doing It Wrong: IE Protected Mode and WebDriver clearly mentions: @JimEvans 在他的文章You're Doing It Wrong: IE Protected Mode and WebDriver中明确提到:

Using the capability doesn't solve the underlying problem though.但是,使用该功能并不能解决根本问题。 If a Protected Mode boundary is crossed, very unexpected behavior including hangs, element location not working, and clicks not being propagated, could result.如果跨越保护模式边界,可能会导致非常意外的行为,包括挂起、元素位置不起作用以及点击不传播。 To help warn people of this potential problem, the capability was given big scary-sounding names like INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS in Java and IntroduceInstabilityByIgnoringProtectedModeSettings in .NET .为了帮助警告人们这个潜在问题,该功能被赋予了听起来很吓人的名字,例如Java中的INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS.NET中的IntroduceInstabilityByIgnoringProtectedModeSettings We really thought that telling the user that using this setting would introduce potential badness in their code would discourage its use, but it turned out not to be so.我们真的认为告诉用户使用此设置会在他们的代码中引入潜在的错误会阻止其使用,但事实并非如此。

Additionally, for IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates.此外,仅对于IE 11 ,您需要在目标计算机上设置一个注册表项,以便驱动程序可以保持与它创建的 Internet Explorer 实例的连接。

  • For 32-bit Windows installations, the key you must examine in the registry editor is:对于 32 位 Windows 安装,您必须在注册表编辑器中检查的键是:

     HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
  • For 64-bit Windows installations, the key is:对于 64 位 Windows 安装,关键是:

     HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
  • Note The FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present.注意FEATURE_BFCACHE子项可能存在也可能不存在,如果不存在,则应创建它。 Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.重要提示:在此键中,创建一个名为 iexplore.exe 且值为 0 的 DWORD 值。


References参考

You can find a couple of relevant detailed discussions in:您可以在以下位置找到一些相关的详细讨论:

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 启动 Internet Explorer 时出现意外错误。 IELaunchURL() 返回 HRESULT 80070002 - Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070002 启动Internet Explorer时发生意外错误。 IELaunchURL()使用硒3.13.0返回HRESULT 80070012:IEDriverServer_x64_3.13.0 - Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070012 with Selenium 3.13.0: IEDriverServer_x64_3.13.0 启动Internet Explorer时发生意外错误。 无法从窗口句柄(NoSuchDriver)获取文档 - Unexpected error launching Internet Explorer. Could not get document from window handle (NoSuchDriver) 量角器:启动Internet Explorer时发生意外错误。 所有区域的保护模式设置都不相同 - Protractor : Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones IELaunchURL() 返回 HRESULT 80070012('没有更多文件。') - IELaunchURL() returned HRESULT 80070012 ('There are no more files.') 对Internet Explorer使用Selenium webdriver。 测试不会运行 - Using Selenium webdriver for Internet Explorer. Tests won't run 通过 Selenium 和 Java 使用 IEDriverServer 和 Internet Explorer 在 Microsoft Dynamics CRM 中出现 XPathEvaluator 未定义脚本错误 - XPathEvaluator is undefined’ script error in Microsoft Dynamics CRM using IEDriverServer and Internet Explorer through Selenium and Java 巡航控制硒测试运行中的“启动Internet Explorer时出现意外错误……” - “Unexpected error when launching Internet Explorer…” from cruise control selenium test run 将ChromeDriver与Chrome和IEDriverServer与Internet Explorer 11一起使用时,Click方法的行为会有所不同 - Click method behaves differently when using ChromeDriver with Chrome and IEDriverServer with Internet Explorer 11 Selenium WebDriver Internet Explorer IEDriverServer阻止模态对话框 - Selenium WebDriver Internet Explorer IEDriverServer Blocks Modal Dialog
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM