Hi Team
I am working a web application, in that i need to retrieve the row and column count of a web table and also find the row based on the column cell value and select that row. When i did the spy its identifying as " TableTag" but not the table
can any one help me in providing a code snippet for this
Attached the objet spy element snapshot
Retreive the row/Co count from a web TableTag and cell val
Retreive the row/Co count from a web TableTag and cell val
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Retreive the row/Co count from a web TableTag and cell val
Hi nivasd16,
The row count could be read via the following code. First, you will need to add the TBody element to the repository. After that, you could search for all TrTags that are children elements of the table body.
The same approach could be used for reading the number of columns.
The row could be selected based on any cell value as follows. An advanced RanoreXPath sample could be found in our user guide.
I hope this information will help you.
Sincerely,
Johannes
The row count could be read via the following code. First, you will need to add the TBody element to the repository. After that, you could search for all TrTags that are children elements of the table body.
Code: Select all
int rowCount = repo.Dom.TableBody.FindChildren<TrTag>().Count;
Code: Select all
int columnCount = repo.Dom.Colgroup.FindChildren<ColTag>().Count;
Code: Select all
/dom[@domain='ess-pt1.np.costco.com']//iframe[#'contentAreaFrame']//iframe[#'ivuFrm_page0ivu0']//span[@innertext='ADMINISTRATION SEATTLE WA']/../parent::tr
Sincerely,
Johannes
You do not have the required permissions to view the files attached to this post.