Ranorex sees the File drop down menu here:
/form[@processname='DrillApp']/container[@controlname='toolStripContainer1']//menuitem[@accessiblename='File']
And sees the Restore option here:
/contextmenu[@processname='DrillApp']/menuitem[@accessiblename='Restore Recipe']
It works, but I end up with 2 applications in my Repo. One is my application under test, the other is the app related to the context menu.
Because it is an item in the File menu, it isn't something easy to Spy on its own. Is there a way to get Ranorex to see the context menu is part of the file menu that is part of the AUT?
Object repo sees menu item as different xpath than menu
-
- Posts: 169
- Joined: Fri Nov 08, 2019 3:23 pm
Re: Object repo sees menu item as different xpath than menu
Hi,
Please post a Ranorex snapshot, where we can evaluate both xpaths (two snapshots may be required?).
Generally speaking, I see nothing wrong with two repo elements, because one points to 'form' and the other one to 'context menu', which are two different UI entities? What exactly is your problem, except "aesthetic" problem, that there are two root folders in repo?
There is a way to merge both repo element into one, but I don't think that this is a very good idea, because it may have some unvated side effects, like identifying wrong or non-unique menu items.
What you can do, is to create a root folder with xpath like this:
Then you can move both menu items into this newly created root folder, where each menu item should have xpath like this:
Hope this helps?
Please post a Ranorex snapshot, where we can evaluate both xpaths (two snapshots may be required?).
Generally speaking, I see nothing wrong with two repo elements, because one points to 'form' and the other one to 'context menu', which are two different UI entities? What exactly is your problem, except "aesthetic" problem, that there are two root folders in repo?
There is a way to merge both repo element into one, but I don't think that this is a very good idea, because it may have some unvated side effects, like identifying wrong or non-unique menu items.
What you can do, is to create a root folder with xpath like this:
Code: Select all
/*[@processname='DrillApp']
Code: Select all
//menuitem[@accessiblename='File']
//menuitem[@accessiblename='Restore Recipe']
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