Page 1 of 1

xPath Issue Regarding ListItem

Posted: Fri Apr 16, 2010 6:33 am
by costamesakid
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

Re: xPath Issue Regarding ListItem

Posted: Mon Apr 19, 2010 5:57 pm
by Support Team
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

Re: xPath Issue Regarding ListItem

Posted: Mon Apr 19, 2010 11:41 pm
by costamesakid
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