Design test object class identification properties

This task describes how to define and implement support for the identification properties of your test object class.

Note: This task is part of a higher-level task. For details, see Create or update support for a single control.

Define the list of identification properties

Define the list of identification properties for your test object class.

In the Properties tab (Test Object Class designer), add or remove properties or select base class properties to inherit and include in the list.

Back to top

Specify the use for each property

Specify the UFT One functionalities for which the properties are used.

Add properties from the Properties list on the left side of the Properties Tab to the different groups on the right. This indicates, for example, which properties are included in test object descriptions, which can be verified in checkpoints and used in output values, and which should be used for Smart Identification.

Back to top

Define advanced options - Optional

Define advanced options for identification property support. For details, see the Advanced Options section of the Properties tab (Test Object Class designer).

Back to top

Implement the JavaScript retrieval function

Implement the JavaScript function that retrieves the identification property values from the run-time object:

  1. In the Properties tab (Test Object Class designer), click the Implementation Code button. The JavaScript file opens to the relevant JavaScript function in a Extensibility Accelerator at a glance.

    If you selected a property before clicking the button, the file opens to the relevant section within the function.

    Alternatively, you can open the relevant JavaScript file by double-clicking it in the Project Explorer.

    By default, the name of the JavaScript file is <test object class name>.js, and the name of the function you need to implement is get_property_value. You can modify these names in the advanced options in the Properties tab (Test Object Class designer). If you update the function name in the designer or in the JavaScript file, make sure to update it in the other location as well.

  2. Implement the JavaScript function to retrieve the run-time values for the identification properties. For details, see the section on implementing support for identification properties in the UFT One  Web Add-in Extensibility Developer Guide.

    If the following conditions are met, the test object class inherits the get_property_value implementation from the base class. In that case, the function that you write does not have to retrieve a value for this property.

    • The control you are supporting is represented by the type of HTML element supported by the base class, or it contains such an element and you implemented a function that returns that element to UFT One.

    • The base class supports an identification property by the same name.

Back to top

Test and debug the retrieval function

Test and debug the function that retrieves the identification property values.

For details, see Test and debug your property retrieval function.

Back to top