How do I fix this error

Ranorex Spy, Recorder, and Studio.
robinsiebler
Posts: 6
Joined: Tue May 04, 2010 8:04 pm

How do I fix this error

Post by robinsiebler » Wed May 05, 2010 9:20 pm

Every time I run my test, I get the below error. I turned off folder caching, but I still get the error. How do I get it to always use the absolute path?

Item 'ContextMenuAVE.ContextMenuOpen.MenuItemProject____CtrlPlusO' could be found using its absolute path, but not by using the repository structure. (No element found for path 'menuitem[@accessiblename='Project...Ctrl+O']' within 10s.) Please make sure that all of its parent folders have a unique path! (You can also try to disable caching for the parent folders of this item.)

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Repository rooted folder paths not unique

Post by Support Team » Thu May 06, 2010 11:40 am

As the error message states, the problem is that the RanoreXPath for the folder of the item is not unique, i.e. does not return a parent/ancestor of the item. When Ranorex searches for an item inside a rooted folder, it first searches for the folder and then relatively searches from the found folder for the item path. If a wrong folder element is returned which is not an ancestor of the item, Ranorex can't find the item inside the folder and tries to search for the absolute path again as a fallback mechanism.

To get rid of that error, you have to ensure that the path of the "ContextMenuOpen" folder really returns the right parent/ancestor element of the items inside that folder, i.e. you have to refine the folder path so it matches the right element. You can check that by right clicking on the folder and select "Highlight element".
robinsiebler wrote: How do I get it to always use the absolute path?
For items inside rooted/application folders, Ranorex always performs a relative search for items from the folder they are in. If you want to use the absolute path, you currently have to use non-rooted "normal" folders. I add a feature request to allow absolute path searching for items inside rooted folders to our bug tracking database.

Regards,
Alex
Ranorex Support Team
.
Image