From: Vani Kulkarni Date: 2007-08-07T22:56:06+09:00 Subject: Row count of table Hello all, I am stuck up in finding the row count of a table in a HTML page through Watir script. I am using row_count() function to find the number of rows in the table. Its returning me incorrect number of rows in the table. I tried accessing the table through xpath, since I did not have attribute associated with the table. Following is the HTML of the table [obtained through IE developer bar] whose row count I need:
The row_count() for the table inside the gives as 9, instead of 2. I am using the following xpath : $ie.table(:xpath, "//td[@id='ctl00_ContentPlaceHolder1_dtGridEmployees_dom']/table").row_count() Am I going wrong anywhere? Please let me know. Thanks, Vani -- Posted via http://www.ruby-forum.com/.