Page 1 of 1

Spy incorrectly not finding elements for existing Repo Items

Posted: Wed Aug 28, 2013 11:29 pm
by RanoTester
PROBLEM SUMMARY: The Ranorex Spy is frequently not recognizing existing Repository items if the Repo item is embedded within a folder having content to the right of ‘body/flexobject’. Yet, at playback time, these same repo items are in fact being recognized. Thus, the problem is with the Spy, not the repo item. The screenshots now have the correct captions; before, they were reversed.

WORKAROUND: We’ve had to update the XPath of the folders in the Repository by removing all content to the right of ‘body/flexobject’ and then adding that content to the start of the Xpath of the repo items below. Once this is done and saved, the Repo item beneath the folder will now be recognized by Ranorex Spy. However, this is creating a redundant, innefficient set of folders in the Repository because many now have the exact same Parent level structure on down to the folder.

HOW LONG HAS THIS BEEN A PROBLEM: This problem is new. It did not start to occur until we upgraded from Ranorex v4.0.1 to 4.1.0.

SYSTEM INFO: Ranorex Studio Version 4.1.0.25227 . . . Internet Explorer 8 Version 8.0.7601.17514 . . . Java Version 7 Update 25 (build 1.7.0_25-b17) . . . Flash Player 11.8.800.94 . . . Windows 7 Ultimate N Service Pack 1 64-bit Operating System . . .. Installed Memory: 4.00 GB - Processor - Intel(R) Core(TM @ 2.67GHz)

Re: Spy incorrectly not finding elements for existing Repo Items

Posted: Mon Sep 02, 2013 3:46 pm
by Support Team
Hi,

Could you please copy the absolute path of the rooted folder to Ranorex Spy in order to check if the RxPath is unique?
It is highly recommended to use unique RxPaths for the rooted folders.
If the RxPath is not unique please use a unique one, you shouldn't see the "issue" when you use a unique one.

Regards,
Markus

Re: Spy incorrectly not finding elements for existing Repo Items

Posted: Thu Sep 26, 2013 11:24 pm
by RanoTester
This has already been done. The problem has been confirmed to be with the Spy, not the RxPath of the rooted folder or items within that folder. :)

The business impact is loss in customer productivity due to not being able to determine if a given Repo Item that failed to be found at playback time failed due to a legitimate problem with its RxPath or if the Spy is falsely stating the Repo Item is invalid when we go to troubleshoot the fail. Performing the below-stated Workaround takes time and has resulted in many non-unique rooted folders, i.e., rooted folders that now have the same RxPath due to having to perform the below-stated workaround.

This problem has been proven numerous time, such as a few minutes ago, where a given Repository Item was not working as seen in Spy, yet that same Repository Item worked at playback time, i.e., when it was mapped to a Mouse Click Action Event of a given script. In Spy, this Repo item was deemed to be invalid starting with any node levels beyond "body/flexobject/". That is the consistent pattern we are seeing. We never saw this problem type before we upgraded to Ranorex v4.1.0.

The instances where the Ranorex Spy is wrong (because the same Repo item works at playback time) have a 100% commonality - That the rooted folder (that the Repo item resides in) has folders beyond "body/flexobject/", and the first point of failure in the Repo item (as interpreted by Spy) is the first node after "/flexobject/".

For example, if the main folder has RxPath "/dom[@caption~'(10 - ALC)']" and the rooted folder has RxPath "body/flexobject/container/container/container", then items within the rooted folder (i.e., that should be good because they have unique, well designed RxPaths) will be seen about 75% of the time as invalid when viewed via Spy. Yet, these same Repo items do indeed work at playback.

The workaround is cumbersome - We have to, in this example, change the RxPath of the rooted folder from "body/flexobject/container/container/container" to simply "body/flexobject" and then add "container/container/container/" to the front of each RxPath within the rooted folder. This may have to be done to 10, 25, 50 or more Repo Items depending on what rooted folder has encountered the problem. This has led to multiple rooted folders with the identical RxPath - "body/flexobject". Repo Items within rooted folders that now have identical RxPath "body/flexobject" still work at playback time and when viewed in Spy.

Nevertheless, once this workaround has been performed, the Repo items within the rooted folder show as good (i.e., all in green) when viewed in Spy, and they also still work at playback time.

Re: Spy incorrectly not finding elements for existing Repo Items

Posted: Mon Sep 30, 2013 4:43 pm
by Support Team
Hello,

It seems to be a weird behavior that should not occur.
Unfortunately, we couldn't reproduce your issue.

We would like to analyze your issue in detail.
Is it possible to send us ([email protected]) a Ranorex Snapshot of your application and your Ranorex Repository (<TestSuite>.rxrep)? This would be a great help.

Thank you in advance.

Regards,
Markus (T)

Re: Spy incorrectly not finding elements for existing Repo Items

Posted: Tue Oct 08, 2013 8:43 pm
by RanoTester
Done - I just sent the requested files to [email protected]. The email has subject "Requested Files (Re: Ranorex Spy Problem)" and refers to the Title of this bug report in the body. Let me know what you find. Thanks!

Re: Spy incorrectly not finding elements for existing Repo Items

Posted: Mon Oct 14, 2013 4:15 pm
by Support Team
Hello,

Thank you for your snapshot.

Regards,
Markus (T)