转载地址: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. 属性字符串的replaceCharactersInRange方法

    一,实验: 1> 让 range 的 length 参数为0,以下代码输出属性字符串的结果为12354 NSMutableAttributedString *attrStr = [[NSMuta ...

  2. weblogic部署项目包,报空指针错误

    贴出 报错代码 <weblogic> <> <> <1479765377228> <BEA-240003> <Console enco ...

  3. man page分類與說明

    轉載自http://itzone.hk/article/article.php?aid=200407152225014657 (如有侵權,請留言或來信告知) 前言 Man page是每位程式設計員及U ...

  4. 20145330第九周《Java学习笔记》

    20145330第九周<Java学习笔记> 第十六章 整合数据库 JDBC入门 数据库本身是个独立运行的应用程序 撰写应用程序是利用通信协议对数据库进行指令交换,以进行数据的增删查找 JD ...

  5. [慢查优化]慎用MySQL子查询,尤其是看到DEPENDENT SUBQUERY标记时

    案例梳理时间:2013-9-25 写在前面的话: 在慢查优化1和2里都反复强调过 explain 的重要性,但有时候肉眼看不出 explain 结果如何指导优化,这时候还需要有一些其他基础知识的佐助, ...

  6. PHP 7 测试用例(转)

    性能改善:PHP 7高达两倍快的PHP 5.6 显著减少内存使用 抽象语法树 一致的64位支持 改进的异常层次结构 许多转化为异常致命错误 安全随机数发生器 删除旧的和不支持的SAPIs和扩展 空合并 ...

  7. Jenkins 2.7.3 LTS 发布

    更新如下: Stop A/B testing of the remoting JNLP3 protocol due to the known issues. The protocol can be e ...

  8. 浅谈iOS中的userAgent

    浅谈iOS中的userAgent   User-Agent(用户代理)字符串是Web浏览器用于声明自身型号版本并随HTTP请求发送给Web服务器的字符串,在Web服务器上可以获取到该字符串. 在公司产 ...

  9. 李洪强iOS经典面试题124

    1. Object-c的类可以多重继承么?可以实现多个接口么?Category是什么?重写一个类的方式用继承好还是分类好?为什么? 答: Object-c的类不可以多重继承;可以实现多个接口,通过实现 ...

  10. Top Deep Learning Projects in github

    Top Deep Learning Projects A list of popular github projects related to deep learning (ranked by sta ...