Watir question regarding table rows and loop

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2010-05-25T23:39:19Z Indexed on 2010/05/25 23:41 UTC
Read the original article Hit count: 221

Filed under:
|
|

Hi, I would like to go through a table and look for a word, if that word appears, i would like to click on a radio button in the same row, but not the same column, then stop the loop. I have something like this at the moment but i dont know where to go on from here.

  @ie.div(:class, 'tableclass').table(:index, 1).each do | row |
     row.each do | cell |
    if (cell.text() == 'text')
      ##Set radio button
break end end end

I tried selecting a radio by name and index, but i do not know how to get the row number that it is currently at. Thanks.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about loops