解决Ruby在IE11中报Unable to get browser (Selenium::WebDriver::Error::NoSuchWindowError)的错误

转载地址:http://www.tuicool.com/articles/BRnqeu2

I was updating the browser WebDrivers for    Seleno    when I hit an issue with the InternetExplorerDriver. I was running Selenium WebDriver 2.43.1 on Windows 8.1 and using Internet Explorer 11. The test was just opening the google web page. Internet Explorer opened correctly and displayed the google page but then the test failed with the error:

OpenQA.Selenium.NoSuchWindowException : Unable to get browser

It turns out this is an    issue with Internet Explorer 11 rather than the InternetExplorerDriver    . This causes the InternetExplorerDriver to lose the connection to the instance of Internet Explorer it created.

All security zones should be set to the same Protected Mode setting

I found that setting the Local Intranet zone‘s    Enable Protected Mode    setting to true solved my problem for me.

  1. Press the      Alt      key to bring up the IE11 menu bar.
  2. Select      Tools > Internet Options      and go to the      Security      tab.
  3. Select each zone (Internet, Local intranet, Trusted sites, Restricted sites) and check the      Enable Protected Mode      check box.
  4. 每个启用保护模式的复选框全部选中,之后重启IE11浏览器。

Other Options

A number of people reported that adding the domain they were testing to the list of "Trusted Sites" solved this problem for them. You can also do this on the Security tab of Internet Options.

The    wiki page    for the InternetExplorer also details a registry setting that you can apply to deal with this problem.

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.

时间: 2024-08-07 19:03:37

解决Ruby在IE11中报Unable to get browser (Selenium::WebDriver::Error::NoSuchWindowError)的错误的相关文章

Selenium::WebDriver::Error::WebDriverError:Unable to find standalone executable解决办法

情况描述: 在Watir-Webdriver环境下运行脚本报错(红色标记部分): C:\>irbirb(main):001:0> require 'watir-webdriver'=> trueirb(main):002:0> Watir::Browser.new :ieSelenium::WebDriver::Error::WebDriverError: Unable to find standalone executable. Please download the IEDri

解决导入Android例子时“Unable to resolve target 'android-x' ”的错误

今天导入一个Android的例子程序,出现了Unable to resolve target 'android-2' 的错误. 最后google之后才发现原来是 ADK版本 :---API Level对应关系(注意高版本不一定是兼容低版本的) android2.3.4---10 android2.3.3---10 android2.3.1---9===Gingerbread android2.2---8===Froyo android2.1---7===Eclair android2.0.1--

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法

上面那个问题刚解决,就又来一个问题~~~~ 错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException 网上有不少解决办法 一般都会在Activity  onCreate()方法里的setContentView(XXX)发生此错误,网上查阅了很多原因,大概有四种重要可能的原因: 原因一:xxx的错误,若为R.layout.main 

PHP如何让apache支持.htaccess 解决Internal Server Error The server …错误

TP框架  打开 www.newtp.com/index.php/Home/Index/abc出现 如下错误: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform

【SQLYOG】SSH ERROR:UNABLE TO OPEN CONNECTION:GETHOSTBYNAME:UNKNOWN ERROR牵引出来的一系列问题

出现这个问题很蹊跷,SQLyog管理过一二十台的mysql服务器或者vps,连接一直没有问题,各种服务商的都没问题,也包括阿里云的.可昨天偏偏一台阿里云的服务器本地通过SQLyog去连接它的时候报这样的错:SSH Error:Unable to open connection:gethostbyname:unknown error,谷歌.百度.好搜了几个小时都无果(查完无此相关问题). 刚开始以为是防火墙出了问题,结果关闭阿里云防火墙测试,同样无法通过,百思不得其解,另外3台阿里云的ECS服务器

ubuntu 'Unable to correct problems, you have held broken packages' 错误

在用apt 安装软件时,有时会用国内的源以加快下载速度. 但是在使用ubuntu 14.04的过程中,这一过程可能会导致错误“Unable to correct problems, you have held broken packages”. 经测试,网上的apt-get install -f, aptitude等都无效.其实只要将源换成官方的源,然后apt-get update, apt-get upgrade即可解决. ubuntu 'Unable to correct problems,

如何让apache支持.htaccess 解决Internal Server Error The server …错误

如何让apache支持.htaccess 解决Internal Server Error The server …错误 文章来源:小灰博客| 时间:2013-12-25 12:17:08| 作者:Leo | 2 条评论 文章分类:IT技术分享.PHP.小技巧     标签: .htaccess.apache 今天朋友发来一套叫“PHP爱家房产网源码v5.01_destoon内核%4017558.net”的程序,让修改点东西,我在本地环境打开测试,导入数据库后打开发现报错,应该是服务器内部错误,提

error C2039: 'SetDefaultDllDirectories'错误解决办法

使用VS2013+WDK8.1+Win7开发UMDF驱动,当使用了CComPtr类,包含了atlcomcli.h头文件却报错,错误如下: Error 3 error C2039: 'SetDefaultDllDirectories' : is not a member of '`global namespace'' 可是使用VS2012+WDK8.0+Win7却没有这个问题. 经过一番折腾终于找到了解决办法,在预定义中增加一项定义  _USING_V110_SDK71_ 具体见下图: error

解决php 5.4下dedecms登陆后台空白,标题不能为空错误

这两天有人反应新版的php-fpm的php版本为5.4.7对dedecms5.6兼容性不好. dedecms安装完成后会出现登陆后台空白,发布文章时提示"标题不能为空". 1.解决dedecms登陆后台空白错误因为php5.4的版本废除了session_register,所以需要去掉session_register函数 修改:"include/userlogin.class.php",注释掉session_register,修改后如下//@session_regis