[Wtr-general] Watir 1.5 Specifying Element in Form Error

Bach Le forum-watir-users at openqa.org
Mon Aug 7 19:13:35 EDT 2006


Thanks for getting back to me so quickly.

Here is an example of it working in 1.4.1 and not in the 1.5 development build.

		ie = IE.new
		ie.goto("www.entertainment.com")
		ie.link(:text, 'Buy the Book').click
		ie.link(:text, 'Chicago North (2007)').click
		ie.image(:index, '4').click
		ie.button(:name, 'checkout').click
		ie.form(:name, 'shipaddress').button(:src, 'https://www.entertainment.com/images/button_continue.gif').click

I was testing this on the entertainment.com website with the above watir code and it is working correctly in 1.4.1 by clicking the right button, however, in 1.5, i get the following error message:

Output for 1.5

  1) Error:
test_1(TestCase):
Watir::Exception::UnknownObjectException: Unable to locate object, using src and https://www.entertainment.com/images/button_continue.gif
    c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2267:in `assert_exists'
    c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1054/./watir.rb:2405:in `click'
    test.rb:15:in `test_1'


Output for 1.4.1

>ruby test.rb
Loaded suite test
Started
.
Finished in 21.531 seconds.

1 tests, 0 assertions, 0 failures, 0 errors
>Exit code: 0



By the way, there is only one form on the page though I'm not sure that should make a difference.


I'll log the bug in JIRA as well. Thanks.


-Bach
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=3381&messageID=9425#9425



More information about the Wtr-general mailing list