Roles, capabilities, and more

When tracking and identifying UI elements, Ranorex Studio also categorizes them according to their purpose and to define their states. The categories Ranorex Studio uses are roles, capabilities, characteristics, and attributes.

Ranorex Studio chooses these categories based on a best-guess method. If it can’t categorize an UI element, it classifies it as Unknown.

This page explains how the categorization process works, which roles, capabilities, and characteristics there are, and where in Ranorex Studio you can find them.

In this chapter

    UI element categorization process

    Ranorex Studio follows a certain order when categorizing UI elements and assigning roles, capabilities, etc. The image below shows this:

    UI-element role & capability assignment

    Technology-independent role assignment

    • Ranorex Studio first defines the role of the UI element.
    • The role defines how a user can interact with the UI element.
    • If Ranorex Studio can’t find an adequate role, it’s set to Unknown.

    Role-specific characteristics

    • Based on the role, Ranorex Studio derives a set of characteristics.
    • These characteristics contain sets of attributes (see item 3) to define the UI element in more detail.

    Attributes

    • Each characteristic comes with a set of attributes.
    • Attributes take values to define the UI element in more detail.
    • Together with those derived from the capability category (item 4), there are more than 600 attributes.

    Technology-specific capabilities

    • Developers use one or more technologies to build the UI of their application.
    • These technologies contain different capabilities, which define what a UI element can do.
    • Based on the technology used for the UI element, Ranorex Studio derives a set of capabilities.
    • Capabilities contain sets of attributes (see item 5) to define the UI element in more detail.
    • There are around 150 capabilities divided into 15 categories.
    • As technology evolves, some capabilities become outdated and new ones are be added.

    Attributes

    • Each capability comes with a set of attributes.
    • Attributes take values to define the UI element in more detail.
    • Together with those derived from the characteristics category (item 3), there are more than 600 attributes.

    Roles

    Roles define how a user can interact with an UI element, i.e. the UI element’s purpose. Below you can see a table of predefined roles in Ranorex Studio. These are technology unspecific and cover the most common UI elements. The Unknown type is for when Ranorex Studio can’t assign an adequate role based on its algorithm.

    Technology-independent roles for UI-elements

    Example for role assignment

    For a quick example of an assigned role, simply take a look at a repository item’s RanoreXPath or select a UI element in the tree browser in Ranorex Spy.

    Example for assinged role to UI-element, part I

    Role visible in repository item

    Radio button for gender selection in AUT.
    Corresponding repository item named RdbFemale in the repository.
    Assigned role in the item’s RanoreXPath.

    Example for assinged role to UI-element, part II

    Role visible in Spy

    Spy displaying the UI element with the assigned role outside quotes in the UI element name (element tree)
    Spy displaying the UI element with the assigned role outside quotes in the UI element name (element details)

    Role-specific characteristics

    Based on the role, Ranorex Studio derives a set of characteristics. They in turn contain sets of attributes that define the UI element in more detail. The number and type of characteristics varies depending on the role. The following image shows an example for a set of characteristics for the role Radio button.

    Role-specific characteristics

    General

    • Attributes and actions in this category are directly derived from the UI element.
    • This category sums up attributes and actions which may originate from other categories.

    Layout

    • Contains all attributes that refer to the graphical layout of the UI element.
    • Attributes in Layout are technology independent.

    Dynamic

    • When a UI element has been implemented with extended functionality by the developer, the corresponding attributes are contained in this category.

    Role attributes

    • Contains attributes that only apply to this specific role.
    • Takes the name of the role. In the example, the characteristic is called RadioButton.

    View role-specific characteristics

    You can view characteristics and their attributes in Ranorex Spy under the Overview and Advanced tabs in the element details.

    Visibility of attributes/values in Ranorex Spy

    Attributes overview: shows a summary of the currently available and assigned attributes of the UI element.
    Attributes advanced view: shows the attributes in detail and lets you edit them.

    Technology-specific capabilities

    Aside from the role-specific characteristics above, Ranorex Studio also assigns technology-specific capabilities that in turn contain sets of attributes. Capabilities are organized in technology categories. The table below shows these categories and the number of capabilities they contain.

    Technology-specific capability categories

    Example for capability assignment

    Let’s use the radio button form our previous examples here again. The image below shows the attributes overview for the radio button in Ranorex Spy. We can see that it has been assigned the Control capability, which contains four attributes and is part of the WinForms technology. This is because the AUT uses the WinForms technology to implement the radio button.

    Example for Control capability assignment

    The Control capability, part of the WinForms technology
    The four attributes this capability contains.

    View all capabilities and their attributes

    You can view all capabilities and attributes through the Edit path weights… menu in Ranorex Spy.

    In the attributes overview in Spy, click Edit path weights….
    In the displayed dialog, click Show attribute overview….

    Edit path weights... dialog in Ranorex Spy
    The attributes overview opens.
    Overview of capabilities and attributes

    Capabilities
    Attributes for each capability