Hi Paatsch,

How about using XPath to get the element in just one line of code
rather then using the loops? In your case it would be something like
this:

ie.checkbox(:xpath, "//td[contains(., 'Test3')]/../td/input/").click()

This XPath query first select the <td> containing text Test3 (this is
what you said is fixed and known before hand), then it goes to its
parent i.e. <tr> and then traverse down the tree to first <td> and
then <input> element inside that <td> which is the checkbox element
that you want.

For using XPath download the tar ball from HEAD and read the
documentation under the docs section.

Hope this helps.

Regards,
Angrez

_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to