Browser & results screen

As explained on the introductory page to this chapter, Ranorex Spy has two working environments: the browser & results screen and the path editor. On this page, you’ll find out how the former works and what it is used for.

In this chapter

    tipp icon


    The screencast “Spy functions” walks you through the information found in this chapter.:

    Watch the screencast now

    Element tree browser

    The element tree browser is on the left side of the working environment by default. It’s a hierarchical representation of running applications and their UI elements. By default, it displays all applications that are running on an endpoint (i.e. machine) and whitelisted in Ranorex Studio. However, you can also display only a certain application or node.

    The functions of the tree browser are explained further below.

    Ranorex Spy UI-element tree browser

    Element tree browser displaying ALL running and whitelisted applications.

    Element tree browser displaying only the application RxMainFrame, which is the Ranorex Studio Demo Application.

    Element tree browser functions

    The area above the element tree browser contains several buttons and a status indicator. The button layout differs slightly between the standalone and the integrated Spy. The difference is indicated below in the captions.

    UI-element tree browser toolbar

    Browse endpoint and Endpoints (only in standalone Spy)
    Load from snapshot… and Save as snapshot…
    Highlight elements
    Status indicator
    Displays the status of the element tree browser. Three statuses are possible:

    Ranorex Spy UI-element tree browser status

    Live display mode
    The tree represents the applications of the currently active endpoint.

    Live edit mode
    You are editing an element of the currently active endpoint.

    Snapshot mode
    The tree was loaded from a Ranorex snapshot, which represents a static snapshot of an endpoint’s applications.

    Browse endpoint and Endpoints

    • Browse endpoint displays all currently running and whitelisted applications on the active endpoint (= automation root).
    • If you’ve restricted the tree to a specific application, click Browse endpoint to display all applications again.
    • If no endpoints are defined, the automation root is the current host, i.e. the machine Spy is opened on.
    • Endpoints (only available in standalone Spy) opens the endpoints pad, from where you can select which endpoint you want to use as automation root. For the integrated Spy, you need to set the automation root in the endpoints pad in Ranorex Studio.
    Ranorex Spy endpoints menu

    Ranorex Spy endpoints pad

    Click the Endpoints button in the toolbar.
    The endpoints pad opens.

    Further reading

    Endpoints are explained in

    Web and mobile testing > ⇢ Endpoints.


    • Updates the element tree to reflect changes in the applications.

    Load from snapshot… and Save as snapshot…

    • Load from snapshot lets you open an existing snapshot file.
    • Save as snapshot saves the currently selected UI element and all of its ancestors and descendants to a snapshot file.

    Further reading

    Ranorex snapshots are explained in

    Ranorex Studio advanced > Ranorex Spy > ⇢ Snapshot files.

    Highlight elements

    This function is the same as the one in the repository toolbar. It highlights the selected element in the UI of the actual application with a red frame. Naturally, the application must be running for this to work.

    Ranorex Spy highlight function

    Click the Highlight elements button.
    The element is highlighted with a red frame in the application.

    Note icon


    The respective application must be running and visible on the endpoint for this to work.

    Element tree browser context menu

    In addition to the toolbar buttons, right-clicking an element in the tree brings up a context menu that offers many further options.

    UI-element tree browser context menu - part I

    UI-element tree browser context menu – part I

    Highlight element
    Highlights the element in the application. Explained in the previous topic.

    Update element data
    Refreshes the element. Explained in the previous topic.

    Set element as root
    Makes the element the root of the element tree browser.

    In the tree, select the UI element you want to set as root.
    In the context menu, click Set element as root.
    The tree now has the element as root.

    Set UI-element as root function
    UI-element tree browser context menu - part II

    UI-element tree browser context menu – part II

    Add to repository

    • Generates a repository item for the element and adds it to the repository.
    • You can either add only the selected element, or the element and all its children.
    • For the integrated Spy, the repository item is added to the repository currently active in Ranorex Studio.
    • For the standalone Spy, the repository item is added to the default Spy repository or one that you’ve loaded.
    UI-element tree browser context menu - part III

    UI-element tree browser context menu – part III

    Save as snapshot…
    Saves the element to a snapshot file. Explained in the previous topic.

    Capture screenshot

    • Captures a screenshot of the element as it appears in the application. Useful for image-based automation.
    • The application containing the element must be running and the path to the element valid. Refresh the element tree beforehand if necessary.
    • After it has been captured, the screenshot is opened in the image editor.
    • Saved screenshots can also be used for image comparison in code, e.g. for finding and comparing images or image-based automation.

    UI element details

    The details area lists all properties and attributes of a selected UI element.

    UI-element details area

    UI-element details area

    Primary adapter and name of element

    • Additionally, information about the size and position of the UI element on the desktop are displayed.
    • Values are in pixels and based on an x/y coordinate system.

    Switch between the overview and advanced details.
    Area where the details are displayed.

    Further reading

    UI elements and their details, i.e. properties and attributes, as well as the concept of adapters are explained in

    Ranorex Studio advanced > ⇢ UI elements.

    Edit path weights…
    Opens a menu that allows you to configure the mapping of dynamic UI elements.

    Further reading

    Mapping dynamic UI elements is explained in

    Ranorex Studio expert > ⇢ Mapping dynamic UI-elements.

    Image navigation area

    The image navigation area shows the UI the selected element is part of. You can navigate through the UI as if you were in the application. When you click a UI element in the image, it will be selected in the tree.

    Click a UI element in the image.
    The corresponding tree element is selected.

    Image navigation area
    • At the top of the image navigator, you can see the primary adapter type and the name of the currently selected UI element.
    • When you move the mouse over a UI element in the image, the adapter type and name will change accordingly.
    • Double-clicking outside the UI image switches to the image for the parent element.