Watir under IronRuby Error

Hi all,

I am trying to get my Watir scripts running under IronRuby, but am
encountering the following error:

:0:in `require’: no such file to load – dl (LoadError)
from C:/ironruby-0.9.0/lib/ruby/1.8/dl/import.rb:3
from ./watir/winClicker.rb:53
from ./watir.rb:42

Any help gratefully appreciated!

Ok, so after hacking watir.rb, I managed to get IE to open and navigate
to the URL, but then using the following basic script:

require ‘watir’ # use watir gem
test_site = ‘http://www.google.com’ # set a variable
b = Watir::IE.new # open the IE browser
b.goto(test_site) # load url, go to site
b.text_field(:name, “q”).set(“pickaxe”) # load text “pickaxe” into
search field named “q”
b.button(:name, “btnG”).click # “btnG” is the name of the
Search button, click it

if b.text.include?(“Programming Ruby”)
puts “Test Passed. Found the test string: ‘Programming Ruby’.”
puts “Test Failed! Could not find: ‘Programming Ruby’”

I now get the following error:

./watir/element.rb:54:in assert_exists': Unable to locate element, using :name, "q" (Watir::Exception::UnknownObjectException) from ./watir/element.rb:288:inenabled?’
from ./watir/element.rb:60:in assert_enabled' from ./watir/input_elements.rb:328:inset’
from Simplewatirscript.rb:6

Can you share how you got it to work?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs