There are so many posts on this issue. Even still, it took me awhile this afternoon to get the row count on my table. Sharing this forward in case it can be a quick solution for someone else.
Repository element RxPath
public static int TableRowCount(Adapter element)
TBodyTag tbody = new TBodyTag(element);
int rowCount = tbody.Children.Count;
Report.Info("User", "Table size: " + (rowCount - 1).ToString());
// header is first row so subtract 1
return (rowCount - 1);
The KEY thing is to add '/tbody' to your RxPath.
Hope this is helpful!
Best practices, code snippets for common functionality, examples, and guidelines.
1 post • Page 1 of 1