UI-roles & capabilities
When tracking UI-elements, Ranorex specifies the role and capabilities of this UI-element. Ranorex maps every UI-element to the type (i.e. adapter-type) which fits most. If no adequate adapter-type is available, Ranorex classifies the UI-element as ‘Unkown’. This chapter introduces and explains the concept of mapping UI-elements to their role and capabilities.
In this chapter
UI-element mapping process
The concept of assigning a role and capabilities to UI-elements is explained in this section. See the below-displayed image which outlines the complete process.
UI-element role & capability assignment
- Each UI-element is matched against a technology-independent role
- If no adequate role is available, Unknown is selected
- Ranorex chooses a role out of a set of 35+ pre-defined roles
- There are role-specific characteristics (i.e. attributes, actions) which are derived directly from the UI-element
- General and Layout contain a set of characteristics for the role independent from its type
- Dynamic contains attributes which extend the functionality of the UI-element compared to the basic UI-element
- Each role also hosts a set of Role attributes in a container with the role’s name
- ‘General’, ‘Layout’, ‘Dynamic’ and the ‘Role attributes’ container consist of a set of attribute/value pairs
- In summary, 643+ attribute/value pairs exist
- Additionally a UI-element is assigned one or more technology-specific capabilities
- There are 167+ capabilities structured in 15+ categories
- As technology evolves, capabilities and categories will be added
- Capabilities are defined through sets of attribute/value pairs
- In summary, 643+ attribute/value pairs exist
The below-displayed image lists the set of well-known and commonly used technology-independent roles for UI-elements. Ranorex chooses a role out of a set of 35+ pre-defined role types.
Technology-independent roles for UI-elements
Example for role assignment
See a simple example of a role assignment. The role of a UI-element can easily be seen in Ranorex Spy and in the RanoreXPath specification of the UI-element.
Example for assinged role to UI-element, part I
Radio button with gender selection in application under test
Corresponding repository item named
RdbFemale in Ranorex Recorder repository
Assigned role (=adapter type) of UI-element in RanoreXPath specification
Example for assinged role to UI-element, part II
UI-element tree browser view in Ranorex Spy displaying the corresponding UI-element with role assignment
Role name and element name of UI-element in Ranorex Spy
Technology-independent roles are defined through a number of attribute/value pairs and actions which are structured in different containers.
- All attributes and actions in this category are directly derived from the UI-element (adapter type)
- This category sums attributes and actions which may have their origin in other categories
- This category contains all attributes which refer to the graphical layout of the UI-element
- The content of this category is technology-independent
- Whenever a UI-element extends its base element, it implements attributes and/or actions which are put into this category
- Each role refers to an attribute category which has the role’s name
- This category contains all role-specific attribute/value pairs and actions for the UI-element description
- The current example outlines the category for the role
Visibility of role-specific characteristics
Role-specific characteristics (as well as all other attributes) can be seen in Ranorex Spy.
Visibility of attributes/values in Ranorex Spy
Attributes advanced view: shows the attributes organized in categories of the UI-element in detail
If necessary, one, or more technology-specific capabilities can be assigned to a UI-element. The below-displayed image shows the 15+ categories in which the different capabilities are structured in. Capability categories may contain a single capability or up to 100+ capabilities.
Technology-specific capability categories
Example for a capability assignment
The current example outlines that the UI-element with the role
RadioButton is assigned the
Control capability. As displayed in the image below, the Control capability is part of the WinForms category.
Example for Control capability assignment
Attributes: The capability Control contains four attribute/value pairs
Visibility of capabilities & attributes
Capabilities and attributes are accessible through the Edit path weights… link in Ranorex Spy.
Edit path weights… dialog in Ranorex Spy
Click the link Edit path weights… in Ranorex Spy
In the displayed dialog, click the link Show attribute overview… to display all capabilities and attributes
Overview of capabilities and attributes
Attributes structured in capabilities