Watir not opening webpages on IE9
I use cucumber + watir.
My code works fine in Windows XP Mode for both IE7 and IE8.
However, when I try to run the code in Windows 7 with IE9, it would only open a blank page.
My computer runs Windows 7 64-bits, and it opens the 32-bit IE9 browser.
The initializing code is as follows:
if ENV['FIREWATIR']
require 'firewatir'
Browser = FireWat开发者_StackOverflowir::Firefox
else
case RUBY_PLATFORM
when /darwin|linux/
require 'firewatir'
Browser = FireWatir::Firefox
# require 'safariwatir'
# Browser = Watir::Safari
when /win32|mingw/
require 'watir'
Browser = Watir::IE
when /java/
require 'celerity'
Browser = Celerity::Browser
else
raise "This platform is not supported (#{PLATFORM})"
end
end
What might be the problem?
are you running your scripts from a command line that is opened 'as administrator' when running on Win7? It's been my experience that is required for things to work correctly
Watir 1.9 was recently released, with fully support for IE9. Which version are you using?
精彩评论