解决selenium2在IE11上出错的问题,如Unable to get browser

Posted 测试蝈蝈

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决selenium2在IE11上出错的问题,如Unable to get browser相关的知识,希望对你有一定的参考价值。

官方解决方案:

https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver#required-configuration

Required Configuration

  • The IEDriverServer exectuable must be downloaded and placed in your PATH.
  • On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
  • Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
  • The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
  • 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. 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. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that 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.

以上是关于解决selenium2在IE11上出错的问题,如Unable to get browser的主要内容,如果未能解决你的问题,请参考以下文章

IE11 中的 css 计算错误

Python3+Selenium2完整的自动化测试框架实现:IE和Chrome浏览器驱动配置

IE11 中的 Array.map() 出错

等待 Protractor 与页面同步时出错:在 Protractor IE11 执行中

Selenium2.0之WebDriver的启用IE10(IEDriverServer)

Selenium2+Java自动化-启动浏览器