One way to do it is to Assert that row n exists while row n+1 does not exists with xpath, something like :
assertElementPresent | //table[@id='mytable']/tr[10] | |
assertElementNotPresent | //table[@id='mytable']/tr[11] | |
to verify table with id mytable does not have 10 elements
Another way is to use the SEL:storeassertXpath extension to count columns
assertXpath | count(//table[@id='mytable']/tr) | 10
Here i am using GetXpathCount() and xpath to identify the row collection of the named ("mytable") table.
Assert.AreEqual(3,selenium.GetXpathCount("xpath=id('mytable')/tbody/tr"),"Expected 3 rows in table");
Here i am asserting my table contains 3 rows (including heading)