ychang
ychang

Reputation: 76

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 = FireWatir::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?

Upvotes: 1

Views: 477

Answers (2)

Bret Pettichord
Bret Pettichord

Reputation: 455

Watir 1.9 was recently released, with fully support for IE9. Which version are you using?

Upvotes: 1

Chuck van der Linden
Chuck van der Linden

Reputation: 6660

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

Upvotes: 1

Related Questions