• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

解决Ruby在IE11中报Unabletogetbrowser(Selenium::WebDriver::Error::NoSuchWindowErr ...

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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

 


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
《20分钟体验Ruby》通过这个例子你能感受ruby发布时间:2022-07-18
下一篇:
rubyOpenURI模块使用发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap