gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-04 17:57:04 25 4
gpt4 key购买 nike

我正在尝试在 64 位 Windows 7 上将 watir-webdriver 与 IE9 一起使用。
当我尝试打开一个新的浏览器时,我收到以下错误消息,有什么解决方案的想法吗?

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 group 上的这个线程与保护模式的限制有关:
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

关于watir-webdriver - 使用 IE9 在 Windows 7 上运行 watir-webdriver 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6454048/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com