Hi,
I'm a new user of Ranorex and I'm stuck on a multi-column list problem.
On a web page, I have to look for a value in the "Name" column and then click on an icon in the "Action" column
I've searched the different tutorials and courses but I couldn't find anything..
Thank you for your help
Search Item in a list and select
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Search Item in a list and select
Hi Francis,
With a Ranorex Snapshot file, I can provide better example RxPaths, but in the meantime, I can use this test webpage (click "Load" to show the example table).
To achieve this, you want your RxPath to point to the "Name" cell, then back up to the row using /../ (parent), then down to the "Action" cell.
1. Point to "Name" cell:
2. Navigate to parent row element using /../
3. Navigate to child "Action" cell (5th column in this example). This is the final RxPath to use in the test. Changing "Marie" to another name will show the proper category in the row with this name.
You should be able to apply this same method to your table. if you have any trouble with it, provide a Ranorex Snapshot file if this table and I will be happy to further assist.
Cheers,
Ned
With a Ranorex Snapshot file, I can provide better example RxPaths, but in the meantime, I can use this test webpage (click "Load" to show the example table).
To achieve this, you want your RxPath to point to the "Name" cell, then back up to the row using /../ (parent), then down to the "Action" cell.
1. Point to "Name" cell:
Code: Select all
/dom[@domain='www.ranorex.com']//table[#'VIPs']//td[@innertext='Marie']
Code: Select all
/dom[@domain='www.ranorex.com']//table[#'VIPs']//td[@innertext='Marie']/../
Code: Select all
/dom[@domain='www.ranorex.com']//table[#'VIPs']//td[@innertext='Marie']/../td[5]
Cheers,
Ned
-
- Posts: 3
- Joined: Fri Jul 24, 2020 9:12 am
Re: Search Item in a list and select
Thank you for your help,
here is the snapshot The structure of the table is a bit complicated I don't see how to go from the name to the action
here is the snapshot The structure of the table is a bit complicated I don't see how to go from the name to the action
You do not have the required permissions to view the files attached to this post.
-
- Posts: 3
- Joined: Fri Jul 24, 2020 9:12 am
Re: Search Item in a list and select
Hi Support team,Support Team wrote: ↑Mon Jul 27, 2020 6:13 pmYou should be able to apply this same method to your table. if you have any trouble with it, provide a Ranorex Snapshot file if this table and I will be happy to further assist.
Have you been able to examine my problem?
I'm still stuck.
Thank you for your help.
Re: Search Item in a list and select
Hi,
The UI you are working with is somewhat complicated and there is not an easy way to achieve what you want. You must create at very least two xpaths and obtain ChildIndex of row, belonging to item you want to edit and then use this ChildIndex (representing row number) in second xpath (repo element), which finds the 'view' or 'remove' button (you need to create two repo elements, if you want to click both buttons) .
This xpath returns row, to which belongs the item name "78vzy1-gp-01" (of course, you should replace the hardcoded name with variable connected to data connector). Then using GetValue action, obtain the ChildIndex attribute of the row and store it in variable...
The UI you are working with is somewhat complicated and there is not an easy way to achieve what you want. You must create at very least two xpaths and obtain ChildIndex of row, belonging to item you want to edit and then use this ChildIndex (representing row number) in second xpath (repo element), which finds the 'view' or 'remove' button (you need to create two repo elements, if you want to click both buttons) .
This xpath returns row, to which belongs the item name "78vzy1-gp-01" (of course, you should replace the hardcoded name with variable connected to data connector). Then using GetValue action, obtain the ChildIndex attribute of the row and store it in variable...
Now you need to apply the obtained ChildIndex value in below xpath, which returns either 'view' or 'remove' icon belonging to item you want to edit.../dom[@domain='10.66.1.116:8080']//div[#'uxfwk-rm-coreEquipment-list-table']/?/?/div//table/tbody/tr/td[@class~'col-name']//div/span[@innertext='78vzy1-gp-01']/ancestor::tr
Hope this helps?/dom[@domain='10.66.1.116:8080']//div[#'uxfwk-rm-coreEquipment-list-table']//div[@class~'col-last']/div[@class~'contents']/table/tbody/tr[@childindex=$obtainedChildIndexVal]//div[@class='ng-scope']//ul/li[@name='view']
/dom[@domain='10.66.1.116:8080']//div[#'uxfwk-rm-coreEquipment-list-table']//div[@class~'col-last']/div[@class~'contents']/table/tbody/tr[@childindex=$obtainedChildIndexVal]//div[@class='ng-scope']//ul/li[@name='remove']
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