Ranorex Spy
Ranorex Spy is the component of Ranorex Studio that makes it possible to explore and analyze the UI of desktop, mobile, and web applications for the purpose of identifying UI elements. Spy captures all running applications (according to your >⇢ whitelist) and displays them and their subelements in a tree view. It therefore recognizes UI elements, identifies them, assigns a RanoreXPath to them, and ultimately makes them available as repository items to Ranorex Studio.
Spy is available as a standalone version and from within Ranorex Studio.
On this page, you’ll find out how to start Spy and use its basic functions.
In this chapter
Related chapters
Ranorex Spy is an advanced topic that is closely connected to the concepts of RanoreXPath and UI elements. Together, they explain how UI element identification in Ranorex Studio works. We therefore recommend you also study these chapters.
Further reading
RanoreXPath is explained in
Ranorex Studio advanced > ⇢ RanoreXPath.
Further reading
UI elements are explained in
Ranorex Studio advanced > ⇢ UI elements.
Start Ranorex Spy
Spy is available integrated into Ranorex Studio and as a standalone tool.
Integrated Spy
In the Ranorex Studio toolbar, click the Spy icon.
Click View > View Spy.
In a repository, click EDIT IN SPY next to a selected repository item.
Standalone version
Open Ranorex Spy from the Start Menu.
Hint
Ranorex Spy is available as a 32-bit and as a 64-bit version. When you run Spy from within Ranorex Studio, it uses the same bit architecture as Ranorex Studio. When you run the standalone version, it’s up to you which bit architecture you choose.
We recommend always using all Ranorex Studio tools with the same bit architecture as your AUT.
Ranorex Spy layout
In the image below, you can see the layout of the standalone Spy with the BROWSER & RESULTS tab active. The areas framed in green change when selecting PATH EDITOR instead. These areas are explained separately as part of the pages ⇢ Browser & results and ⇢ Path editor.
The areas in red are fixed and explained further below.
Element browser / repository selector (standalone only)
Switches between the element browser and the repository. Loading repository files (.rxrep) is only possible in the standalone Spy.
Track button and RanoreXPath field
The track button lets you track, identify, and add new UI elements. The RanoreXPath field displays the RanoreXpath of an element and also lets you edit it.
Switch between browser & results screen and the path editor
These are explained separately on the pages⇢ Browser & results and ⇢ Path editor.
UI-element tree view
This hierarchical tree structure represents all running applications (depending on whitelist settings) and their UI structure.
UI-element details
Selecting a UI element in the tree displays detailed information about it in this section.
Image navigation area
Displays a selected UI element as it would appear in the application and can be used to navigate through the UI.
Element browser/repository selector
Only available in the standalone version of Spy. Lets you switch between the element browser and the repository view.
In the repository view, you can load and manage repository files (.rxrep). This is particularly useful when you want to add repository items to a repository on a computer where Ranorex Studio isn’t available.
The repository view is the same as in Ranorex Studio and has all the same functions.
Reference
Managing repositories is explained in
Ranorex Studio fundamentals > ⇢ Repository.
Track function
Ranorex Spy has a track function that lets you identify UI elements and add them to the element tree, from where you can then add them to your repository.
TRACK button and RanoreXPath field:
- The track button starts the tracking process.
- The RanoreXPath field displays the RanoreXPath of the tracked UI element
Root UI element
- You can only track UI elements that are contained in the root element.
- In the example, the RxMainFrame (The Ranorex Studio Demo Application) is the root element and the button
RxButtonExit
is the tracked UI element. This means that tracking a button in the Windows Calculator would not work because it’s a separate application. If the root was the entire endpoint, it would work.
RanoreXPath field
RanoreXPath field in edit mode
- Normally, the RanoreXPath field is white and displays the RanoreXPath of the element currently selected in the tree.
- When you click in the field and press Enter, it changes to edit mode. This is indicated by a red X, yellow background, and a message below the field.
- You can now change the RanoreXPath and press Enter again and the element tree will display all elements that match this path.
Exit edit mode
- Clicking the red X exits edit mode.
Working environment selector
The working environment selector lets you switch between the browser & results screen and the path editor.