Hi,
I am new to Ranorex . Can you please send me the code for this?
My application has a table which consists of 4 columns. Table has many number of rows, but I need to select 75 cells (elements) in the second column and need to validate that it gets selected.
Div/Table/Tbody/TR
Each Trtag has Td[1], Td[2], Td[3] and Td[4]
Table name = stripList (divtag)
Column 1 = Td/Imgtag
Column 2 = Td/divtag
Column 3 = Tdtag
column 4 = Tdtag
Table = /dom[@domain]//iframe[#'content_iframe']//div[#'strip_list']
Column 2 = /dom[@domain]/iframe[#'content_iframe']//div[#'strip_list']/table/tbody/tr[2]/td[2]//div[#'090a3be56efaa9b2123669759a0eb200']
Thanks
SJan
How to select each element in the column 2 of the table
Re: How to select each element in the column 2 of the table
Hello,
Can you please provide a snapshot of your application's table? It makes it much easier to work with and can allow us to provide you more accurate information.
http://www.ranorex.com/support/user-gui ... files.html
If you have a repository element which returns many elements (ie: one repository element = 75 cells in a column), you can use the below loop in a code module to loop through each element.
As always, there are many ways to achieve this. It really depends on your configuration, environment and needs.
I hope this helps!
Can you please provide a snapshot of your application's table? It makes it much easier to work with and can allow us to provide you more accurate information.
http://www.ranorex.com/support/user-gui ... files.html
If you have a repository element which returns many elements (ie: one repository element = 75 cells in a column), you can use the below loop in a code module to loop through each element.
Code: Select all
var repoAllCells = repo.dom.table.cellInfo; //Access Info object by appending 'Info'
IList<TdTag> allCells = repoAllCells.CreateAdapters<TdTag>(); //Create a list
foreach (TdTag cell in allCells) //Loop through list
Report.Info(cell.InnerText.ToString()); //Do stuff with specific element
I hope this helps!
Re: How to select each element in the column 2 of the table
Thank you.
I tried the other way and it worked. Second column elements consists of Div tags and these are the only Divtags in the table. So, I directly found the Divtags and used the For loop to loop through each row element (in the second column)to select specific 75 elements from the list.
I tried the other way and it worked. Second column elements consists of Div tags and these are the only Divtags in the table. So, I directly found the Divtags and used the For loop to loop through each row element (in the second column)to select specific 75 elements from the list.