如何避免问题与"保护模式"使用IEDriverServer硒? [英] How do I avoid issues with "Protected Mode" using IEDriverServer in Selenium?

查看:280
本文介绍了如何避免问题与"保护模式"使用IEDriverServer硒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Internet Explorer(在我的情况8)通过詹金斯执行Selenium测试。我明白了保护模式的Internet安全选项需要设置为相同的值(启用或禁用)的所有站点区域为了这个工作。

I'm attempting to use Internet Explorer (8 in my case) to execute Selenium tests via Jenkins. I understand that the "Protected Mode" Internet Security Option needs to be set to the same value (enabled or disabled) for all Site Zones in order for this to work.

我都在浏览器中试着这样做(确保我的登录身份的执行在詹金斯测试相同的用户),并通过GPO策略本地计算机策略\\计算机配置\\下的所有网站区管理模板\\ Windows组件\\ Internet Explorer \\ Internet控制面板\\安全页,并在本地计算机策略\\用户配置\\管理模板\\ Windows组件\\ Internet Explorer \\ Internet控制面板\\安全页。

I've tried doing this both in the browser (making sure I'm logged in as the same user that's executing the tests in Jenkins) and via the GPO Policy for all Site Zones under "Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Internet Explorer\Internet Control Panel\Security Page" and under "Local Computer Policy\User Configuration\Administrative Templates\Windows Components\Internet Explorer\Internet Control Panel\Security Page"..

不过,我不断地收到下列错误:

However, I continue to receive the error listed below:

意外错误启动IE浏览器。保护模式设置不是所有区域相同。启用保护模式必须设置为相同的值(启用或禁用)的所有区域。

任何人都可以点我在正确的方向,以解决此问题?

Can anyone point me in the right direction in order to resolve this?

推荐答案

(张贴的答案我自己的问题柜面任何人来这里从搜索。)

(Posting the answer to my own question incase anyone else comes to here from a search.)

为了最终获得过去这个问题,我不得不做两件事情:

In order to finally get past this problem I had to do two things:

首先,确认您的打开保护模式的设置是完全为计算机配置和用户配置相同。我不认为这实际上就设置是否启用/禁用,或保护模式是否启用/禁用,只要所有的人(11下的计算机配置和11用户配置)是相同的。

First, verify that your "Turn on Protected Mode" settings are exactly the same for both "Computer Configuration" and "User Configuration". I don't think it actually matters whether the setting is Enabled/Disabled, or whether Protected Mode is Enabled/Disabled, so long as all of them (11 under Computer Configuration and 11 under User Configuration) are identical.

要做到这一点,最快捷的方法是使用组策略编辑器来验证所有适当的设置进行配置。

The quickest way to do this is to use the Group Policy Editor to verify that all of the appropriate settings are configured.

要做到这一点,打开本地组策略编辑器(开始/运行/输入gpedit.msc),并定位到本地计算机策略\\计算机配置\\管理模板\\所有设置节点。排序方式设置(如果尚未完成),直到你看到一堆打开保护模式设置向下滚动。

To do this, open the Local Group Policy Editor (start / run / gpedit.msc) and navigate to the "Local Computer Policy\Computer Configuration\Administrative Templates\All Settings" node. Sort by Setting (if not already done) and scroll down until you see a bunch of "Turn on Protected Mode" settings.

配置每个这些是相同的值。在我来说,我原本设置这些全部启用和保护模式禁用,但一旦我终于找到了注册表的变化(见下图),我回去并设置都为未配置就像它最初是和我的解决方案仍然工作。主要的一点是让他们都完全一样。

Configure each of these to be the same value. In my case I had originally set these all to be Enabled and Protected Mode Disabled, but once I finally found the registry change (see below), I went back in and set everything to "Not Configured" like it was originally and my solution still worked. The main point is to make them all exactly the same.

然后重复这个过程为本地计算机策略\\用户配置\\管理模板\\所有设置节点。

Then repeat this process for the "Local Computer Policy\User Configuration\Administrative Templates\All Settings" node.

一旦做到这一点,所有的保护模式设置应该是相同的。注:如果您使用一个用户来执行你的测试,另一个用于系统管理,经由过程在两个用户只是柜面。 (我在我的设置问题,所以我如果这是必需的不知道,但它不能伤害。)

Once this is done, all of your Protected Mode settings should be the same. NOTE: If you use one user to execute your tests and another for system management, go through the process on both users just incase. (I had issues in my setup so I'm not sure if this is required, but it couldn't hurt.)

二,调整注册表设置。
导航到HKLM \\软件\\微软\\的Windows \\ CurrentVersion \\ Internet设置\\区。对于每个子键(0,1,2,3,4),找到名为2500的DWORD。如果它不存在,创建它。再次,设置的值是所有5个区域相同。我用'0',这是启用。我相信,3是禁用。

Second, adjust your registry settings. Navigate to "HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones". For every sub-key (0,1,2,3,4), locate the DWORD named "2500". If it doesn't exist, create it. Again, set the value to be identical for all 5 Zones. I used '0', which is Enabled. I believe '3' is Disabled.

重复此过程HKCU \\软件\\微软\\的Windows \\ CurrentVersion \\ Internet设置\\区为正在使用IEDriverServer.exe用户。

Repeat this process for "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones" for the user that is using IEDriverServer.exe.

一旦您更新注册表,重新启动计算机。

Once you've updated the registry, reboot your machine.

以下几个小时试图手动调整设置或通过GPO后,解决了我这个问题这两个步骤。其他人似乎已经与这两种方法的成功,但使用注册表编辑只是,在我的环境中工作的事情(复制(固定)两个不同的詹金斯从站)。

Following these two steps resolved the problem for me after many hours of trying to adjust the settings manually or via the GPO. Other people seem to have had success with either method, but using the registry edits was the only thing that worked in my environment (replicated (and fixed) on two different Jenkins slaves).

请注意:我做的是操作IEDriverServer与命名用户帐户詹金斯。如果你执行你的测试为本地系统的用户,你可能想看看这个答案对于进一步的指示/故障排除。

NOTE: I'm doing the IEDriverServer manipulation with a named user account for Jenkins. If you're executing your tests as the "Local System" user, you may want to take a look at this answer for further instructions/trouble-shooting.

这篇关于如何避免问题与"保护模式"使用IEDriverServer硒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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