Very helpful Thanks
-----Original Message----- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 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, 1).row_count 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 <dduph...@redbrickhealth.com> 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 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 -~----------~----~----~----~------~----~------~--~---