本文介绍了InternetExplorerDriver的注册表项HKEY_LOCAL_MACHINE \ ... \ FEATURE_BFCACHE如何解决Internet Explorer 11问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我正在IE11中自动化一个Web应用程序(政府签约三声加油!),我正在按照Selenium Wiki上的说明进行配置,因为我们有许多奇怪而怪异的行为.我现在处于此步骤,它说,我已经添加了一个注册表项,以帮助维持驱动程序和浏览器之间的连接:

So I am automating a web application in IE11 (Three cheers for government contracting!) and I am following the instructions on the Selenium Wiki to configure the thing because we have had a bunch of weird and wonky behavior. I am at this step here and well, it says that I have add a registry key to help maintain a connection to between the driver and the browser:

但这并不能真正解释为什么?如果您没有添加此密钥,怎么了? 维护IE实例和Webdriver之间的连接"一词可能意味着很多不同的事情.

But it doesn't really explain why? What goes wrong when you don't have this key added? The words "Maintain connection between an instance of IE and the webdriver" can mean a lot of different things.

我们遇到的问题在很大程度上与Selenium方法有关,例如.click()无法正常工作或无法在页面上单击以获得一些有趣的参考点.我们还遇到了一些奇怪的滚动问题,当元素在屏幕外时,它无法通过测试,这很奇怪,因为它应该读取DOM,但是我离题了.

The problems we are experiencing deal largely with Selenium Methods like .click() not working or not clicking on the page for those interesting in a point of reference. We are also having some weird scrolling issues where it fails a test when the element is juuuuust off-screen, which is weird because it should be reading the DOM, but I digress.

推荐答案

您看对了.根据 必需的配置 InternetExplorerDriver明确提到:

You saw it right. As per the documentation in the Required Configuration section of InternetExplorerDriver it is clearly mentioned:

仅对于 IE 11 ,您将需要在目标计算机上设置注册表项,以便驱动程序可以维持与其创建的Internet Explorer实例的连接.

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.

  • 对于32位Windows安装,您必须在注册表编辑器中检查的密钥为:

  • For 32-bit Windows installations, the key you must examine in the registry editor is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. 

  • 对于64位Windows安装,密钥为:

  • For 64-bit Windows installations, the key is:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. 
    

  • 注意 FEATURE_BFCACHE 子项可能存在也可能不存在,如果不存在则应创建.重要说明:在此注册表项内,创建一个名为iexplore.exe的DWORD值,其值为0.

  • Note The FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.

    按照@JimEvans在讨论中的评论 IE11异常, IEDriverServer:无法获取浏览器:

    As per @JimEvans comments within the discussion IE11 exceptions with IEDriverServer: Unable to get browser:

  • 在此讨论中,@ JimEvans进一步添加了以下注释:

  • In this discussion @JimEvans further added a comment as:

    这篇关于InternetExplorerDriver的注册表项HKEY_LOCAL_MACHINE \ ... \ FEATURE_BFCACHE如何解决Internet Explorer 11问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

  • 10-24 17:47