Configure object identification for a test object class
Relevant for: GUI tests and components
This topic describes configuration options that control how test objects of each test object class are identified and created.
Set properties for identifying an object
-
Select Tools > Object Identification.
-
In the Object Identification Dialog Box, set the properties that are learned for the test object description:
- Select the environment.
- Select the test object class.
-
Set mandatory and assistive properties. Click Add/Remove under the mandatory or assistive property lists and select the necessary properties from the Add/Remove Properties Dialog Box.
- Select an ordinal identifier.
Set properties for Smart Identification
-
In the Object Identification Dialog Box, select the environment and test object class for which you want to configure Smart Identification.
-
Select the Enable Smart ID checkbox. The Configure button is enabled.
-
Click the Configure button to open the Smart description properties Dialog Box.
-
In the Smart description properties dialog box, set the base and optional properties.
-
Set the order in which the optional properties are used.
-
If you do not want OpenText Functional Testing to learn the Smart description properties, clear the Enable Smart Identification checkbox. The configuration is saved, but not used.
Select the property to use for test objects' logical names
For Web test objects, you can define which property OpenText Functional Testing uses when creating the logical name for test objects of this class. If you want to use only part of the property's value, specify a regular expression to extract the relevant part.
Example: You may have an application with button objects with a title property containing the button text, and a name property containing an internal identification for the button.
If OpenText Functional Testing names the button based on the name property, it might look like this: WebButton("button1nujihf9hrnejk_new")
.
You can configure the logical name to be taken from the title property, so the button is learned like this: WebButton("Start")
.
To specify the property to use for Web test object logical names
-
In the Object Identification Dialog Box, select the Web environment and select the test object class whose logical name you want to customize.
Note: Logical name definition is not supported for WebAgGrid and WebUIGrid test objects.
-
Under Logical Name Definition, in the Values taken from property list, select the property to use for test objects' logical names.
If you select UFT Default, internal logic is used to decide which property to use.
-
Optionally, enter a regular expression. This expression is matched to the selected property value and the logical name is built accordingly.
Example: The html id value for a button in your web application is appx-slds-btn-cloud. If you want the logical name for the WebButton test object to be btn-cloud, configure the following:
In the WebButton in Object Identification configuration, in values taken from property, select html id.
In Using regex, enter
bt.*