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

  1. Select Tools > Object Identification.

  2. In the Object Identification Dialog Box, set the properties that are learned for the test object description:

    1. Select the environment.
    2. Select the test object class.
    3. 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.

    4. Select an ordinal identifier.

Back to top

Set properties for Smart Identification

  1. In the Object Identification Dialog Box, select the environment and test object class for which you want to configure Smart Identification.

  2. Select the Enable Smart ID check box. The Configure button is enabled.

  3. Click the Configure button to open the Smart description properties Dialog Box.

  4. In the Smart description properties dialog box, set the base and optional properties.

  5. Set the order in which the optional properties are used.

  6. If you do not want UFT One to learn the Smart description properties, clear the Enable Smart Identification check box. The configuration is saved, but not used.

Back to top

Select the property to use for test objects' logical names

For Web test objects, you can define which property UFT One 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 UFT One 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

  1. 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.

  2. 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 UFT One uses its internal logic to decide which property to use.

  3. Optionally, enter a regular expression. UFT One matches this expression to the selected property value and builds the logical name 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.*

Back to top