转载地址: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.

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

  1. Jmeter的安装和启动时出现unable to access jarfile apachejmeter.jar error value=1错误处理

    Jmeter是纯Java开发的, 能够运行Java程序的系统一般都可以运行Jmeter, 如:Windows. Linux. mac等. 由于是由Java开发,所以自然需要jdk环境. Windows ...

  2. Jmeter的安装和启动错误总结,出现unable to access jarfile apachejmeter.jar error value=1错误处理

    Jmeter是纯Java开发的, 能够运行Java程序的系统一般都可以运行Jmeter, 如:Windows. Linux. mac等. 由于是由Java开发,所以自然需要jdk环境. Windows ...

  3. ie11 selenium 报错org.openqa.selenium.NoSuchWindowException: Unable to get browser 处理方法

    selenium + ie11运行报错 org.openqa.selenium.NoSuchWindowException: Unable to get browser (WARNING: The s ...

  4. WIN7 X64 解决无法安装IE11,以及无法点击微软升级包MSU的问题

    一般在官方下载的文件是MSU格式的后缀文件,这个文件属于系统升级包补丁:下载完毕之后直接点击安装会报错,错误提示如下:安装程序遇到错误:0x80070422 无法启动服务,原因可能是已被禁用或与其相关 ...

  5. 运行RF测试案例,显示unable to open socket to "localhost:56505" error: [Errno 10061] 错误,且关闭RF卡死的解决办法

    问题描述: 执行WEB ui测试案例后,执行请他的测试案例显示unable to open socket to "localhost:56505" error: [Errno 10 ...

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

    TP框架  打开 www.newtp.com/index.php/Home/Index/abc出现 如下错误: Internal Server Error The server encountered ...

  7. selenium3 调用IE Unable to get browser

    本地环境开发,移至服务器上出现Unable to get browser的问题.经过查找找到问题所在(第六点,需要修改注册表增加键): 1.下载IEDriverServer.进入索引页,首先选择版本号 ...

  8. python2.7运行selenium webdriver api报错Unable to find a matching set of capabilities

    在火狐浏览器33版本,python2.7运行selenium webdriver api报错:SessionNotCreatedException: Message: Unable to find a ...

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

    出现这个问题很蹊跷,SQLyog管理过一二十台的mysql服务器或者vps,连接一直没有问题,各种服务商的都没问题,也包括阿里云的.可昨天偏偏一台阿里云的服务器本地通过SQLyog去连接它的时候报这样 ...

随机推荐

  1. [iOS-UI]点击清空按钮,却会有提交的感觉

    一,问题分析 1.感觉像是点击清空按钮时调用了添加按钮的事件. 2.插入断电后,还真是这样. 3.仔细想想,才发现,原来是我复制了添加按钮,变成为添加按钮,进而点击清空时,不仅清空了所有内容,还把最新 ...

  2. 关于加了hibernate 框架的项目启动特别慢的问题

    今天突然遇到一个问题,就是加了hibernate 框架的项目在启动的时候,特别慢,竟然达到了4分多钟,查来查去,看到我的bean类里*.hbm.xml,有这样的写法: <?xml version ...

  3. SolrCloud 5.x 集群部署方法

    CentOS下安装Solr5.3    http://www.centoscn.com/image-text/install/2015/0918/6190.html solr5.3.1 集群服务搭建 ...

  4. GO语言练习:网络编程 ICMP 示例

    1.代码 2.编译及运行 1.Go语言网络编程:ICMP示例代码 icmptest.go package main import ( "fmt" "net" & ...

  5. CSS3两个动画顺序衔接播放

    问题描述: 第一个动画先播放,播放完成后,第二个动画紧接着播放. 解决办法: 1. 将第二个的延迟时间(animation-delay) 设置成第一个的持续时间( animation-duration ...

  6. 黑马程序员----java基础笔记中(毕向东)

    <p>------<a href="http://www.itheima.com" target="blank">Java培训.Andr ...

  7. Hadoop.2.x_WebUV示例

    一.网站基本指标(即针对于网站用户行为而产生的日志中进行统计分析) 1. PV:网页浏览量(Page View页面浏览次数,只要进入该网页就产生一条记录,不限IP,统计点每天(较多)/每周/每月/.. ...

  8. java之main函数(笔记)

    1.标准的main函数形式 对于main函数,只要是 public static void main(String[] args) public static void main(String... ...

  9. php Output Control 函数 ob_系列函数详解

    <?php /* * 输出缓冲控制 * * flush — 刷新输出缓冲 ob_clean — 清空(擦掉)输出缓冲区 ob_end_clean — 清空(擦除)缓冲区并关闭输出缓冲 ob_en ...

  10. JavaScript 入门教程二 在HTML中使用 JavaScript

    一.使用 <script> 元素的方式有两种:直接在页面中嵌入 JavaScript 代码和引用外部 JavaScript 文件. 二.使用内嵌方式,一般写法为: <script t ...