Repo items not being recognized when under folders

Bug reports.
User avatar
Gunner1980
Posts: 89
Joined: Mon Apr 05, 2010 8:44 pm
Location: Austin, Texas

Repo items not being recognized when under folders

Post by Gunner1980 » Thu Apr 14, 2011 10:07 pm

I have the following repo item

FormRealView.MenuItemCreate_Track

The path to FormRealView = /form[@title='' and @processname='RealView' and @class~'Afx:.*']
the path to MenuItemCreate_Track = contextmenu[1]/menuitem[@accessiblename='Create Track']

When I run my scripts which worked in 2.3.8 and did not have this problem I get the following warning.

Code: Select all

'TacViewLibRepository.FormRealView.MenuItemCreate_Track' could be found using its absolute path, but not by using the repository structure. Please make sure that all of its parent folders have unique paths.  
If I move the item MenuItemCreate_Track to the parent level and set the path to the following it works just fine. It is the same exact path except it isn't under a folder in the repo anymore.

/form[@title='' and @processname='RealView' and @class~'Afx:.*']/contextmenu[1]/menuitem[@accessiblename='Create Track']

Why would moving to 3.0.1 have caused this to happen and what can I do to fix it? I have several items under that form and moving them all to the parent directory seems like a very sloppy work around.

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

Re: Repo items not being recognized when under folders

Post by Support Team » Fri Apr 15, 2011 9:58 am

Gunner1980 wrote:If I move the item MenuItemCreate_Track to the parent level and set the path to the following it works just fine. It is the same exact path except it isn't under a folder in the repo anymore.
Yes, it's the same path, but it is searched differently: Once by searching the folder first, and once by searching the item directly with its full path. Please, see following post that explains in detail why you get this warning:
http://www.ranorex.com/forum/how-do-i-f ... html#p4953
Gunner1980 wrote:Why would moving to 3.0.1 have caused this to happen and what can I do to fix it?
I can only imagine that with 3.X there are more contextmenu elements now (Ranorex 3.X recognizes more elements now for the MSAA flavor). Since "contextmenu[1]" is not a very robust path (it only takes the first contextmenu found), the wrong contextmenu could be found for the folder. Otherwise, this functionality did not change at all with 3.0.

Regards,
Alex
Ranorex Team
.
Image