1
我正在使用以下代碼片段來創建Internet Explorer瀏覽器並執行一些測試。由於下面給出的例外,我無法創建ie瀏覽器。我該如何解決?watir無法創建Internet Explorer瀏覽器 - 啓用保護模式問題
require 'rubygems'
require 'watir-webdriver'
require 'phantomjs'
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 300
browser = Watir::Browser.new :ie, :http_client => client
browser.goto "some url"
錯誤 -
Started InternetExplorerDriver server (32-bit)
2.29.0.0
Listening on port 5555
C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/response.rb:51:in `assert_ok': Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value (enabled or disabled) for all zones. (Selenium::WebDriver::Error::NoSuchDriverError)
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:59:in `new'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:59:in `create_response'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/default.rb:66:in `request'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:629:in `raw_execute'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:98:in `create_session'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/remote/bridge.rb:68:in `initialize'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/ie/bridge.rb:47:in `initialize'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:35:in `new'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver/common/driver.rb:35:in `for'
from C:/code/ruby/lib/ruby/gems/1.8/gems/selenium-webdriver-2.33.0/lib/selenium/webdriver.rb:67:in `for'
from C:/code/ruby/lib/ruby/gems/1.8/gems/watir-webdriver-0.6.2/lib/watir-webdriver/browser.rb:46:in `initialize'
from web-test.rb:8:in `new'