You can iterate through a table's rows with the .rows function. Using
this, we can find out where your row with the id "xyz" is and add one:

def nextRow(tbl,rowid)
   i=0
   tbl.rows.each{ |r|
      i+=1
      return i+1 if(r.id=="rowid")
   }

That will return the index of the row after the row with id "rowid",
which you can then use like this:

tbl[nextRow(tbl,"xyz")].text

Hope this helps!

-Dylan

On Aug 12, 2:59 pm, Steve Hamlett <shaml...@twia.org> wrote:
> I need to read contents from a row that does not have an id.  That is,
> the HTML tag that designates the row is just <TR>.  Therefore, I can't
> address it directly.
>
> Is there a way to address it indirectly?
>
> It happens that the tag for the prior row does have an id, e.g. <TR
> id=xyz>.
>
> Is there a way to tell Watir to go to the row following the one with
> the id?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to