与Selenium IE Driver的IELaunchURL问题 [英] IELaunchURL issue with Selenium IE Driver

查看:785
本文介绍了与Selenium IE Driver的IELaunchURL问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Selenium Grid运行几个测试用例。我正在使用最新的驱动程序和selenium软件包。

I am running several test cases using Selenium Grid. I am using the latest driver and selenium packages.

有时候脚本运行正常,有时我只在IE上遇到以下错误。

Some time the script is running fine and some time I get the below error only on IE.

我不是每次都会遇到这个问题,但经常会这样。

I am not getting this issue every time, but often.

 Unexpected error launching Internet Explorer.
 IELaunchURL() returned HRESULT 80070005 ('Access is denied.') for URL 'http:// localhost:13879/'

$ b返回HRESULT 80070005('访问被拒绝。')
$ b

当我尝试下面提供的解决方案时,它说我需要对Windows注册表进行一些更改,这在我的企业中是不可能的。

When I tried the solution provided below, it's say I need to do some changes to Windows Registry which is not possible in my enterprise.

https://code.google.com/p/selenium/issues/详细信息?id = 7045

SO中有几个这样的问题,没有人回复。

There are several such questions in SO and none has an response.

编辑:
由于公司政策,我不允许在所有区域启用保护模式。所以我已经有了以下代码来避免保护模式问题。

Due to company policies, I am not allowed to enable Protected Mode in all zones. So I have already have the below code for avoid protected mode issues.

ieCapabilities.setCapability(
    InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,
    true
);


推荐答案

我找到的唯一解决办法是同步受保护的旗帜功能标志集在所有情况下都不起作用。我不确定为什么它不会一直忽略,但我的猜测是IE不断更改实现,因为它们发布更新并且标志与更新不一致。

The only fix I have found is to sync up the protected flags. The capabilities flag set doesn't work in all cases. I'm not sure why it doesn't ignore consistently, but my guess is that IE keeps changing implementation as they release updates and the flag isn't consistent with the updates.

安全问题是IEDriver访问和控制浏览器,这表明微软未知进程拥有浏览器。注册表项与将IEDriver配置为控制IE的安全进程有关。我不确定IE使用的所有特定注册表部分,但您可能会在某些特定于IE的注册站点上找到它们。

The security issue is with IEDriver accessing and controlling the browser which indicates to microsoft an "unknown" process is "possessing" the browser. The registry entries would be related to configuring the IEDriver as a secured process to control IE. I'm not sure of all those specific registry parts that IE utilizes, but you will probably find them on some IE specific registry site.

即使有注册表修复,如果受保护的标志是不同的IEDriver然后会混淆并可能完全失去窗口并在启动后抛出一个未找到异常的窗口。我真的建议尝试让某人为安全设置中的所有4项启用所有保护模式复选框。另一部分是IE有时会启动并告诉您没有推荐设置,并且您想要使用推荐设置。你需要点击否,不要再问我选项。

Even with the registry fixes if the protected flags are different IEDriver then gets confused and may lose the window completely and throw a window not found exception after launching it. I would really recommend trying to get someone to enable all the protected mode checkboxes for all 4 items in the security settings. The other part is that IE will sometimes launch and tell you that you don't have the "recommended" settings and would you like to use the "recommended" settings. You would need to click no and don't ask me again option.

完成上述所有操作后,只要你更新IE,你就必须再次重做它,因此,如果你想使用IE浏览器,无论谁控制你的环境都需要加入。

After all of the above, as soon as you update IE you have to redo it again anyway, so whoever is in control of your environment needs to be on board with this if you want to use IE.

这篇关于与Selenium IE Driver的IELaunchURL问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆