加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

使用IE9在Windows 7上运行watir-webdriver时出现问题

发布时间:2020-12-14 02:02:55 所属栏目:Windows 来源:网络整理
导读:我正试图在64位 Windows 7上使用带有IE9的watir-webdriver. 当我尝试打开一个新的浏览器时,我收到以下错误消息,解决方案的任何想法? C:watirirbirb(main):001:0 require "rubygems"= trueirb(main):002:0 require "watir-webdriver"= trueirb(main):003:0
我正试图在64位 Windows 7上使用带有IE9的watir-webdriver.
当我尝试打开一个新的浏览器时,我收到以下错误消息,解决方案的任何想法?

C:watir>irb
irb(main):001:0> require "rubygems"
=> true
irb(main):002:0> require "watir-webdriver"
=> true
irb(main):003:0> browser = Watir::Browser.new(:ie)
Selenium::WebDriver::Error::NoSuchDriverError: Unexpected error launching Internet Explorer. Protected Mode must be set to the same value (enabled or disabled) for all zones.

我可以在Firefox 4的同一台机器上使用watir-webdriver,所以我猜它和IE9问题?

解决方法

您是否尝试禁用保护模式,因为错误消息告诉您?

工具>>选项>>安全>>取消’启用保护模式’

selenium-developers组上的此线程与受保护模式的限制相关:
http://groups.google.com/group/selenium-developers/browse_thread/thread/4dd6330f97bd2312/3e904642ac3dac6?q

还有相关链接到Watir FAQ.

Try one of these:

  • Add your defaut homepage (or ‘About:Blank’ if you start with a
    blank page) to the same security group
    (e.g. ‘intranet’ or ”trusted sites’)
    as the site you are testing; or
  • Turn off Internet Explorer Protected Mode; or
  • Change your ruby permissions to “run as administrator”; or
  • Disable User Access Control

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读