Very helpful


-----Original Message-----
From: [] On 
Behalf Of John Lolis
Sent: Thursday, January 22, 2009 3:13 PM
To: Watir General
Subject: [wtr-general] Re: Why doesn't this work put table_id.body(:index, 

its the nature of the beast

when you do $ie.table(:id,'value).body(:index,1) you are actually
using a TableBody class. TableBody does not define row_count. To get
around this you could also probably do $ie.table(:id,'value).body
(:index,1).rows.length and avoid iterating over the whole thing.

also you could just ignore the .body, and do $ie.table
(:id,'value).rows.length (or .row_count)

On Jan 21, 1:22 pm, Moochie <> wrote:
> #Doesn't work
> table_id = $ie.table(:id,'value).body(:index,1)
> put table_id.row_count
> #Works
>  row_counter = 0
>  table_id.body(:index,1).each do | row |
>     row_counter = row_counter + 1
>  end
> puts row_counter

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to