[Wtr-general] Button identification

Željko Filipin zeljko.filipin at gmail.com
Wed Apr 25 08:05:32 EDT 2007


Hi Tunde,

In watir 1.5 I think you can use any attribute of a tag (like class), but I
am not sure about that.

ie.button(:class, "my_class").click

you can also use index

ie.button(:index, 1).click

or html

ie.button(:html, /fancy_attribute='something'/).click

or xpath

ie.button(:xpath , "//button[@fancy_attribute='something']/")

or multiple attributes

ie.button(:name => "my_name", :index => 2 ).click

Enough? :)

If you can post html of that button, it would be easier to answer.

Zeljko
-- 
ZeljkoFilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070425/cc2eb9da/attachment.html 


More information about the Wtr-general mailing list