Vince,
I tried placing this line of code in my test, just to see what it would
show:
puts "Button 1: [EMAIL PROTECTED]"
Below is the result. It seems This item somehow isn't considerred a button.
Paul
Started
E
Finished in 20.889 seconds.
1) Error:
test_CreateQuestion_1_1(TestAYN):
Watir::Exception::UnknownObjectException: Unable to locate object, using
index a
nd 0
c:/Program
Files/ruby/lib/ruby/gems/1.8/gems/watir-1.4.1/./watir.rb:1928:in
`assert_exists'
(eval):2:in `name'
C:/cvs/server-qa/qa_tests/ruby/TestAYNAjax.rb:77:in
`test_CreateQuestion_1_1
'
1 tests, 0 assertions, 0 failures, 1 errors
>From: Vince <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [Wtr-general] hi and help with some javascript
>Date: Tue, 19 Dec 2006 13:56:41 CST
>
>Paul,
>
> > Could you really have meant to write:
> >
> > "The links and inputs within those divs are NOT always on the page, ..."
>
>I really wish that was the case, but alas it is not. Using the sample AJAX
>modal box page that I mentioned in my first reply, you can "find" the
>buttons from the modal long before you click the link to fire up the box.
>This is because the div that we are calling a modal box is always on the
>page, but not always visible.
>
>See for yourself:
>
>require 'watir'
>ie = Watir::IE.new
>ie.goto("http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx")
>puts "Button 1: #{ie.buttons[1].name}"
>puts "Button 2: #{ie.buttons[2].name}"
>
>If you only have one on the page, you should have no problem clicking the
>button, setting the modal, and submitting it. If you have multiple and need
>to validate that the correct one is showing (as I do), than you have a long
>day ahead of you...
>---------------------------------------------------------------------
>Posted via Jive Forums
>http://forums.openqa.org/thread.jspa?threadID=5830&messageID=16328#16328
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
_________________________________________________________________
Visit MSN Holiday Challenge for your chance to win up to $50,000 in Holiday
cash from MSN today!
http://www.msnholidaychallenge.com/index.aspx?ocid=tagline&locale=en-us
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general