Hello,
iam new to ranorex. so i have a web table and i am trying to extract some data from the table. the columns in the table are draggable and re organized. so i want to extract the a column list from the table and read the contents in the column. for ex i have a column Account Name. so i want to read all the account numbers in the column or read few numbers by indexing. like acc_number[3,9]. is there any way to do that in ranorex or is it possible to write some code with "using system.collection.generic" library?. can anyone give me a syntax on how to write that??.
thank you.
Slicing the tables
Slicing the tables
You do not have the required permissions to view the files attached to this post.
Re: Slicing the tables
Hi,
The solution of your problem is to get childindex attribute of the column header. You can do this by using GetValue action, pointed to the header cell of your choice (e.g. Account Name). The xpath for the column header should look like this:
https://www.ranorex.com/help/latest/han ... oryelement
All you have to do is to replace Ranorex.Button with Ranorex.TdTag. Hope this helps?
The solution of your problem is to get childindex attribute of the column header. You can do this by using GetValue action, pointed to the header cell of your choice (e.g. Account Name). The xpath for the column header should look like this:
You should store the obtained value to variable (e.g. childIndex), which will be used later. Then you should create another repo element, with the xpath pointing to cells with the same childindex (related to column header). The xpath should look like this:/dom[@domain='6012-sbx.btbanking.com']//div[@id~'acctSummary-view']//section//table/thead/tr/th[@title='Account Name']
For example, Account Name header, in your snapshot, has childindex 1. Which means that all cells under Account Name should have the same childindex. So the second xpath, if filled with correct ChildIndex, should return all cells belonging to header Account Name. Then you can adapt code from this link, showing how to create a list of adapters from repo item (in your case second xpath).../dom[@domain='6012-sbx.btbanking.com']//div[@id~'acctSummary-view']//section//table//tr/td[@childindex=$childIndex]
https://www.ranorex.com/help/latest/han ... oryelement
All you have to do is to replace Ranorex.Button with Ranorex.TdTag. Hope this helps?
You do not have the required permissions to view the files attached to this post.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Slicing the tables
thank you sir, you are awesome