[Wtr-general] How to click on a link in a table
Christian Baumann
mail at chriss-baumann.de
Sat Nov 25 05:53:25 EST 2006
Hi Prashant,
try to click the link by identifying it by its href, like described
here: http://www.mail-archive.com/wtr-general@rubyforge.org/msg05639.html
Regards,
Christian
Prashant Bhatia schrieb:
> I am having some trouble finding a best way to click on a click which is in a table
>
> [TABLE SNAPSHOT]
> [b]| |1. |Basic Skills (link)| | Review (link)|
> | |2. |Pet Handling (link)| | Review (link)|[/b]
> [/TABLE SNAPSHOT]
>
> In the above table, Basic Skills, Review, Pet handling and Review are links.
> I am able to click on Basic Skills & Pet Handling link by
>
> [CODE SNAPSHOT]
> [b] totalCategory = $ie.tables[3].row_count
> for i in (1..totalCategory)
> clickCategory = $ie.tables[3][\i][3].text
> $ie.link(:text, clickCategory).click[/b]
> [/CODE SNAPSHOT]
>
> But if I try to click on the review with the similar logic, it always click on review in the row 1 since it will find the first text "Review" & click it.
>
> I tried to get the link of the text which is in row i cell 5 but again, i text always return Review thus getting the same link.
>
> Can anyone help in this.
>
> Thanks
> Prashant
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=5434&messageID=15143#15143
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
More information about the Wtr-general
mailing list