Hi All,
I am new to Ranorex but so fr it looks great. The automation side of things is fine and very powerful however I am having trouble when testing a product which uses mmc as a command console.
I got around the issue with dynamic IDs but now have a problem where I am trying to locate a text value within a column but the row it is no may change (due to sorting or additional items being added)
Ranorex always defaults to creating a row item in the repository and if i change this to column it does not work. What would be the simplest way to address this issue please?
I have attached a screenshot of the list. So for example if I want to locate and perform an action on an item in the 'name' column knowing that its position in the list may change what should I change the xpath to?
Your help would be very much appreciated
Thanks
Dealing with mmc and changing column sorts
-
- Posts: 52
- Joined: Fri Mar 21, 2014 4:22 pm
Dealing with mmc and changing column sorts
- Attachments
-
- spy.PNG (29.81 KiB) Viewed 1664 times
-
- mmc_List.PNG (36.96 KiB) Viewed 1664 times
- Support Team
- Site Admin
- Posts: 12174
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Dealing with mmc and changing column sorts
Hello houseofcutler,
Unfortunately it is hard to say how the change of the position of the element in the list reflects in the RxPath. Therefore, I may ask if it is possible for you to provide a Ranorex snapshot file of your application to us?
If yes, please upload it to our forum or send it to: [email protected]
Thank you in advance!
Regards,
Robert
Unfortunately it is hard to say how the change of the position of the element in the list reflects in the RxPath. Therefore, I may ask if it is possible for you to provide a Ranorex snapshot file of your application to us?
If yes, please upload it to our forum or send it to: [email protected]
Thank you in advance!
Regards,
Robert
Re: Dealing with mmc and changing column sorts
I have two remarks regarding your issue.
Remark 1
As I see you are looking for an exact match
Sometimes I had a problem, that there were white spaces in the cell we looked for.
Try to change the rxpath to
This way you look for a cell containing the text 'Alert-Photo'
Please note, that the whole matching mechanism is case sensitive.
Remark 2
Regarding your concrete issue, just leave out the index number of the row, like this:
This xpath should find the cell containing the text 'Alert-Photo'.
Best Regards,
Zoltán Major
Remark 1
As I see you are looking for an exact match
Code: Select all
cell[@text='Alert-Photo']
Try to change the rxpath to
Code: Select all
cell[@text~'Alert-Photo']
Please note, that the whole matching mechanism is case sensitive.
Remark 2
Regarding your concrete issue, just leave out the index number of the row, like this:
Code: Select all
/form[@processname='mmc' and @class='MMCMainFrame' and @instance='1']//table[@class='SysListView32']/row/cell[@text~'Alert-Photo']
Best Regards,
Zoltán Major
-
- Posts: 52
- Joined: Fri Mar 21, 2014 4:22 pm
Re: Dealing with mmc and changing column sorts
Sorry I haven't update for a few days.Thank you for the responses - I was able to solve my issue using the advise offered.
My Project now contains:
Rooted Folder for centre window:
Specific Job Item:
Following siblings
And I have also added items with variables for data driven testing:
So far the evaluation is going well
Thanks again
My Project now contains:
Rooted Folder for centre window:
Code: Select all
?/?/form[@title~'^Console\ Root\\Groupcall']/?/?/table[@class='SysListView32']
Code: Select all
row/cell[@text='Dashboard-Heartbeat']
Code: Select all
row/cell[@text='Dashboard-Heartbeat']/following-sibling::cell[@columnindex=3]
Code: Select all
row/cell[@text=$varJobName]/following-sibling::cell[@columnindex=1]

Thanks again