xPath Issue Regarding ListItem

Ask general questions here.
costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

xPath Issue Regarding ListItem

Post by costamesakid » Fri Apr 16, 2010 6:33 am

Im encountering a strange xPath issue with a listitem. If you look at the screen shot below notice every listitem path is the same, less for accessible name.
ScreenHunter_02 Apr. 12 14.25.gif
I am able to highlight every listitem except for 'Amplification'. When I try to highlight this listitem I get the following error:

This is causing my script to fail when i play back. For some reason Ranorex cannot find this one listitem. Any suggestions. Thanks
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: xPath Issue Regarding ListItem

Post by Support Team » Mon Apr 19, 2010 5:57 pm

From the error message it looks like Ranorex can find the item, but cannot make it visible. Could it be that this item is not in view and you have to scroll down in the list to make it visible?

Another problem could be that the path for that item is maybe not unique and you are finding some other list item in your application that corresponds to that path. The path of that element is obviously edited and looks very non-unique; a path with "element//listitem" can match nearly every list item in your application, maybe there are two items with AccessibleName ''Amplification''. Try using the original path generated by Ranorex Spy!

Regards,
Alex
Ranorex Support Team

costamesakid
Posts: 94
Joined: Tue Jun 16, 2009 10:27 pm

Re: xPath Issue Regarding ListItem

Post by costamesakid » Mon Apr 19, 2010 11:41 pm

Actually the Spy returns a path that has ambiguous entries such as 'instances' that can change so I am only using accessiblename to identify each listitem (which is cut off in my screenshot, sorry).

Anyway, i came into work today and all the sudden the path I had for Amplification worked. I imagin my AUT probably was stuck in a strange state, and needed to be restarted and Windows rebooted. Thanks