# Watir under IronRuby Error

**URL:** <https://www.ruby-forum.com/t/watir-under-ironruby-error/174073>\
**Category:** IronRuby\
**Created:** [August 20, 2009, 1:01pm UTC](https://www.ruby-forum.com/t/watir-under-ironruby-error/174073 "2009-08-20T13:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwerty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/4491bb/32.png) [@qwerty](https://www.ruby-forum.com/u/qwerty)\
**Post date:** [August 20, 2009, 1:01pm UTC](https://www.ruby-forum.com/t/watir-under-ironruby-error/174073/1 "2009-08-20T13:01:03Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![qwerty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/4491bb/32.png) [@qwerty](https://www.ruby-forum.com/u/qwerty)\
**Post date:** [August 27, 2009, 5:47pm UTC](https://www.ruby-forum.com/t/watir-under-ironruby-error/174073/2 "2009-08-27T17:47:37Z")

</div>

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](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’.”  
else  
puts “Test Failed! Could not find: ‘Programming Ruby’”  
end

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:in `enabled?’  
from ./watir/element.rb:60:in `assert_enabled' from ./watir/input_elements.rb:328:in `set’  
from Simplewatirscript.rb:6

---

<div class="post-metadata">

**Author:** ![qwerty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/q/4491bb/32.png) [@qwerty](https://www.ruby-forum.com/u/qwerty)\
**Post date:** [September 21, 2009, 4:57am UTC](https://www.ruby-forum.com/t/watir-under-ironruby-error/174073/3 "2009-09-21T04:57:39Z")

</div>

Can you share how you got it to work?
