I'm brand new at this.
I've created a very simple script to test a login page...
require 'watir'
ie = Watir::IE.start("http://mysite")
ie.text_field(:name, "j_username").set("blah")
ie.text_field(:name, "j_password").set("blah")
ie.button(:value, "Submit").click
If I execute these commands manually in irb, I have no problem.
If I execute the script that contains them from the command line, I get this
error:
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1928:in `assert_exists':
Unable to locate object, using name and j_username
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:3382:in `set'
from Z:/Customers/Beneplace/Beneplace Redesign/WATIR
tests/admin-login.rb:5
Even though I get the error, the actions occur - the text is entered into the
text boxes, the button is clicked, and I see the next page.
If I put additional commands AFTER the click, they do not get executed.
This is being used with a JSP page, if that makes any difference, and IE7.
Thanks for any help.
Steven
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6823&messageID=19642#19642
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general