Spy incorrectly not finding elements for existing Repo Items

Bug reports.
RanoTester
Posts: 18
Joined: Mon Jan 14, 2013 7:16 pm

Spy incorrectly not finding elements for existing Repo Items

Post by RanoTester » Wed Aug 28, 2013 11:29 pm

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)
Attachments
8_28_13 - Figure 2 - Spy - Workaround - Fixed.JPG
Workaround performed - This Xpath for Save_7 now finds the item. To do this, had to update the Xpath of the parent folder by removing all content to the right of 'body/flexobject' and adding it to the front of the Save_7 XPath.
8_28_13 - Figure 2 - Spy - Workaround - Fixed.JPG (198.47 KiB) Viewed 1084 times
8_28_13 - Figure 1 - Spy - Problem.JPG
Get Problem - This XPath fails to find Save_7 repo item. The Save_7 repo item should be found with this XPath.update the Xpath of the parent folder by removing all content to the right of 'body/flexobject' and adding it to the front of the Save_7 XPath.
8_28_13 - Figure 1 - Spy - Problem.JPG (186.75 KiB) Viewed 1084 times

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

Re: Spy incorrectly not finding elements for existing Repo Items

Post by Support Team » Mon Sep 02, 2013 3:46 pm

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

RanoTester
Posts: 18
Joined: Mon Jan 14, 2013 7:16 pm

Re: Spy incorrectly not finding elements for existing Repo Items

Post by RanoTester » Thu Sep 26, 2013 11:24 pm

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.

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

Re: Spy incorrectly not finding elements for existing Repo Items

Post by Support Team » Mon Sep 30, 2013 4:43 pm

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

RanoTester
Posts: 18
Joined: Mon Jan 14, 2013 7:16 pm

Re: Spy incorrectly not finding elements for existing Repo Items

Post by RanoTester » Tue Oct 08, 2013 8:43 pm

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!

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

Re: Spy incorrectly not finding elements for existing Repo Items

Post by Support Team » Mon Oct 14, 2013 4:15 pm

Hello,

Thank you for your snapshot.

Regards,
Markus (T)
.
Image