Using :index it doesn't. What it is doing if finding the Xth button from the top of the page (you could count them from view source). I have to use this quite often in the applications I test because of auto-generated page elements which use the same button attributes (id, name, and values) for all similar buttons on the page. For instance, there could be 100 rows of data all with the same 'Add', 'Edit', and 'Delete' buttons. Using the button index is the only way of finding a particular button on the page.
--Mark -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Sent: Friday, September 01, 2006 11:20 AM To: wtr-general@rubyforge.org Subject: Re: [Wtr-general] I am a newb I want to say thanks to everyone, I am trying to understand. With the $ie.button(:index, 2).click command how does it know that it is looking for Cancel. This is the html source I am trying to pull from: <a class="right button" id="sessionDialogCancel" href="JavaScript:hideSessionDialog();">Cancel</a> I have exhausted all of my ideas, I havent tried to do the $ie.button(:index, 2) command yet. I am going to buy a book on Ruby, but college textbooks come first. --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=3917&messageID=10774#10774 _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general