转载地址: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. MySQL数据库迁移(转)

    MySQL数据库迁移(数据文件直接迁移) 在今年10月下旬的时候,公司的服务器需要迁移,其中涉及到了MySQL数据库迁移.查看了一下MySQL数据文件的大小,接近60G的大小(实际数据并没用那么多). ...

  2. MVVMLight Messenging

    Basically there are two possible ways to send a message, first using an overload of the RaisePropert ...

  3. HDU 2955(0-1背包问题)

    题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/M 题目: Description The aspir ...

  4. css中margin-left与left的区别

    研究下拉菜单和弹出菜单时比较所得: 1.直接在css中设置left生效的前提是必须设置父容器position:absolute或relative,如果不设置则会显示为最近一个定位的父对象左边相关的位置 ...

  5. Daily Scrum 10.30

    由于最近一段时间吴文会同学身体欠安,经过讨论我们对任务做了一下调整,暂时由罗洪运同学接手界面部分的开发.部分进度较快的同学的任务已经快要完成,工作重点也会转为整体开发和协助其他同学开发. 下面是今天的 ...

  6. SQL Server 中字符串中包含字符串变量的表示方法

    在代码中有如下的需求:需要在数据库中使用 in 关键字做删除的时候,又需要使用到参数化,参数又是字符串,所以使用的时候就按照如下方式 StringBuilder sql = new StringBui ...

  7. 类 class

    <?php class Person{ //定义一个类 public $name; //定义属性 public $age; function say(){ //定义办法 echo "m ...

  8. js官网判断是否手机跳转到手机页面

    <script src="http://siteapp.baidu.com/static/webappservice/uaredirect.js" type="te ...

  9. php课程---数组

    数组:    一:定义 1.赋值定义    $arr[0] = 5;    $arr[1] = "aa";        print_r ($arr); 2.定义索引数组    $ ...

  10. 【转】Gvim开发环境配置笔记--Windows篇

    配置文件(vimrc) set nocompatible set nu! set cursorline colorscheme murphy " vim 自身命令行模式智能补全 set wi ...