WebTable Row and Colum Count
WebTable Row and Colum Count
How to get Row Count and Column Count in a Webtable , I need to get particular Cell value in a webtable using Row number and column number.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: WebTable Row and Colum Count
Hi,
the easiest way to achieve the information you need is to make use of the RxPath.
Here is a sample code for getting row count and column count:
Peter
Ranorex Team
the easiest way to achieve the information you need is to make use of the RxPath.
Here is a sample code for getting row count and column count:
// get all rows in table and store them in a list IList<Ranorex.TrTag> myRows = table.FindDescendants<Ranorex.TrTag>(); // print out count of rows stored in a list Report.Log(ReportLevel.Info,"Row Count: ", myRows.Count.ToString()); // get all columns in specified row and store them in a list IList<Ranorex.TdTag> myCols = myRows[2].FindDescendants<Ranorex.TdTag>(); // print out count of columns stored in the list Report.Log(ReportLevel.Info,"Column Count: ", myCols.Count.ToString());Regards,
Peter
Ranorex Team
Re: WebTable Row and Colum Count
Thanks , i can get the row and column count .
How to get the "cell value" using row number and column number .
How to get the "cell value" using row number and column number .
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: WebTable Row and Colum Count
Hi,
Regards,
Peter
Ranorex Team
You can use the index of the list. For examplemani wrote:How to get the "cell value" using row number and column number .
myRow[1].myCell[2].InnerTextPlease also take a look to following documentation http://dotnetperls.com/list
Regards,
Peter
Ranorex Team