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
ScreenHunter_02 Apr. 12 14.25.gif (16.01 KiB) Viewed 706 times
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
Attachments
ScreenHunter_03 Apr. 12 14.25.gif
ScreenHunter_03 Apr. 12 14.25.gif (6.83 KiB) Viewed 706 times

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

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
.
Image

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