I'm using windows XP and I need to use watir with ruby, the installation went pretty well, my last try was following the instructions here Failed WATIR installation Server 2003 and everything was ok except for this "ERROR: While generating documentation for builder-2.1.2" then the installation finished with no more problems.
The problem is when I try to run a sample script to execute a google search I got an error when the set function is called, so far I haven't found any useful information about it, if anyone could give me a hand it would be great :)
btw, here http://www.mail-archive.com/[email protected]/msg07722.html they say that it is related to WIN32OLE but they don't explain how to fix it (or at least I didn't get it :s )
The versions I've installed are
ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] gem env RubyGems Environment: - RUBYGEMS VERSION: 1.3.7 - RUBY VERSION: 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] - INSTALLATION DIRECTORY: c:/ruby/lib/ruby/gems/1.8 - RUBY EXECUTABLE: c:/ruby/bin/ruby.exe - EXECUTABLE DIRECTORY: c:/ruby/bin - RUBYGEMS PLATFORMS: - ruby - x86-mswin32-60 - GEM PATHS: - c:/ruby/lib/ruby/gems/1.8 - C:/Documents and Settings/jamontoya/.gem/ruby/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/
The error
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/locator.rb:119:in `each': failed to get IEnum Interface (RuntimeError) HRESULT error code:0x80004002 No such interface supported from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/locator.rb:119:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/container.rb:838:in `locate_input_element' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/input_elements.rb:5:in `locate' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/element.rb:54:in `assert_exists' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/element.rb:315:in `enabled?' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/element.rb:62:in `assert_enabled' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.6/lib/watir/input_elements.rb:364:in `set' from Search.rb:29
The sample code (Search.rb) I removed comments and other unnecessary lines
require "watir" test_site = "http://www.google.com" browser = Watir::Browser.new browser.goto test_site browser.text_field(:name, "q").set("pickaxe") # here is the error when set is called browser.button(:name, "btnG").click browser.close
gem list just in case you need to know
*** LOCAL GEMS *** activesupport (2.3.9) builder (2.1.2) commonwatir (1.6.6) firewatir (1.6.6) fxri (0.3.6) fxruby (1.6.12 mswin32) hoe (2.6.2) hpricot (0.6 mswin32) json_pure (1.4.6) log4r (1.0.5) nokogiri (1.4.3.1 x86-mswin32) rake (0.8.7, 0.7.3) rubyforge (2.0.4) rubygems-update (1.3.7) s4t-utils (1.0.4) sources (0.0.1) user-choices (1.1.6.1) watir (1.6.6) win32-api (1.4.6 x86-mswin32-60, 1.0.4 mswin32) win32-clipboard (0.4.3) win32-dir (0.3.2) win32-eventlog (0.4.6) win32-file (0.5.4) win32-file-stat (1.2.7) win32-process (0.6.2, 0.5.3) win32-sapi (0.1.4) win32-sound (0.4.1) windows-api (0.4.0, 0.2.0) windows-pr (1.0.9, 0.7.2) xml-simple (1.0.12)