As a stand-alone tool the Ranorex Spy provides all the functionality needed to explore and analyze applications or websites under test - including their controls and UI elements. After starting Ranorex Spy, the element browser contains all currently running applications from your Windows desktop.
The element browser tree shown on the left side represents the computer's desktop with all currently opened applications. The name of the root node is set to the machine's host name. By selecting one of the elements from the browser tree, the Spy provides more detailed information about the selected item in the tabs 'Overview', 'Detail' and 'Screenshot' shown on the right. Ranorex recognizes over 30 of the most commonly known types of UI elements. In Ranorex vocabulary they are called 'adapters'. Every element shown within the element tree of Ranorex Spy is represented by an adapter as described in Ranorex UI adapter. If Ranorex is not able to specify the type of adapter of a UI element, it will be displayed as 'Unknown'.
The 'Overview' tab provides the most important view into the details of a UI element. The available attributes and their values are divided into the following sections:
Regardless of what type of UI element is currently selected the 'General' section provides information about whether the element is enabled, valid or visible.
Regardless of what technology is used from the application under test, Ranorex tries to abstract it with logical adapters as explained in Ranorex UI Adapter. These adapters are also used within repositories and provide class specific attribute values like the text value or the state of a checkbox.
This type of adapter is used to group technology related information like the 'ControlName' of a .NET WinForms button or the process name of an application.
All attributes shown within this tab are accessible during an automated test for validation. Depending on the type of a UI element, they may also be used to set values. Learn more about how to use different adapters to read and set attribute values at Code Examples - Create Adapters to Access More Properties and Methods.
In addition all attributes can be used within the RanoreXPath. By default the attribute in the overview tab written in bold is automatically used to identify the UI element.
The RanoreXPath expression shown in the figure above can be seen as a navigation path through the element browser tree used to identify a UI element. You can use the RanoreXPath editor to change element identification or edit the path expression directly within the text box's RanoreXPath edit mode.
Note: You are able to access common text functionality like 'Select All' (<CTRL>+A), 'Copy' (<CTRL>+C), 'Cut' (<CTRL>+X), 'Paste' (<CTRL>+V), 'Undo' (<CTRL>+Z) or 'Delete' (<DEL>) in RanoreXPath.
| Toolbar shortcuts |
||
| Browse Local Host | Shows currently running host applications | |
| Refresh | Updates the current state of applications | |
| Load from Snapshot | Loads an existing Ranorex snapshot file | |
| Save as Snapshot | Saves the currently selected node and all its descendants to a Ranorex snapshot file | |
| Highlight Elements | When switched on, highlights selected UI elements on the users desktop | |
| Update Path | Sets the path from the currently selected element | |
Context menu |
||
| Add to Repository | Adds the current element to a Ranorex Repository | |
| Set Element as Root | Sets the currently selected element as root element | |
| Refresh | Updates all attributes of the specified UI element | |
| Save as Snapshot | Saves the current UI element including the child structure to a Ranorex snapshot file | |
| Add Class or Process Name to GDI Capture List |
Specifies whether the element's class or process name should use the GDI plug-In to turn on text-based object recognition | |
| Highlight Element | Highlights the current element | |
| Capture Screenshot... | Captures a screenshot from the current element to be used for further image-based validation | |
Note: Saved screenshots can also be used for image comparison in code, for example for finding and comparing images or image-based automation. For more information about this, please have a look at Code Examples - How to do image based automation and Code Examples - How to find and compare images.
Download Test Automation Guide
(PDF file, 20MB)