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 cannot categorize a 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.
UI element categorization process
Ranorex Studio follows a certain order when categorizing UI elements and assigning roles, capabilities, etc. The image below shows this:
-
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 being 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 a UI element, for example, 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.
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.
-
Radio button for gender selection in AUT.
-
Corresponding repository item named
RdbFemale
in the repository. -
Assigned role in the item’s RanoreXPath.
-
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 vary depending on the role. The following image shows an example of a set of characteristics for the role Radio button.
-
General
- Attributes and actions in this category are directly derived from the UI element.
- This category sums up attributes and actions that 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.
-
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 into technology categories. The table below shows these categories and the number of capabilities they contain.
Example for capability assignment
Let’s use the radio button from our previous examples here again. The image below shows the attributes overview for the radio button in Ranorex Spy. It has been assigned theControl
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.
-
The Control capability, part of the WinForms technology
-
The four attributes of this capability contain
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….
-
The attributes overview opens.
-
Capabilities
-
Attributes for each capability