Page 1 of 1
How do I fix this error
Posted: 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.)
Repository rooted folder paths not unique
Posted: 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.
Ranorex Support Team