Identifying unsupported objects in test runtime

UFT may fail to find a test object during a test run because the expected properties are incorrect, and may fail to identify and learn an object because it is not a supported object for a specific technology.

In such cases, use a Static test object or static description properties to identify the object.

Static objects exist in the application, but typically cannot be selected or have data entered into them automatically. Since UFT does support Static objects, assigning the Static object type to an unidentifiable object enables you to select the object in your application.

Example: The examples in this topic use the window display in a standard Windows calculator. This window is identified as a Static object, with a window id property of 150.

Create a programmatic description of the object

  1. Create a programmatic description to specify the exact property of the unknown object that you want UFT to identify. 

    The property you specify must be a real UFT test object and must use a real value. You can find this value in the Object Spy.

  2. Use a Description.Create statement to create a Properties collection object.

  3. Set the value of the using a static programmatic description, and a statement to set the value.

    This Properties collection object can now be identified by UFT.

Example: For example, with the Calculator, use a Description.Create statement to specify that you are looking for an object in which the window id property value is 150:

Set des = Description.Create
des="window id:= 150"

Back to top

Set the unsupported/unidentified object as Static object type

Once you have created a Properties collection object and specified the value of the object, assign this "object" as an object of Static type.

Example: For example, with the Calculator, assign UFT to find the object with the window id value of 150 by assigning this "object" as a Static type:

Set des = Description.Create
des="window id:= 150"

Back to top

Assign the unsupported/unidentified object to a supported object type

Additionally, assign the unsupported or unidentified object to a supported object type to perform a specific method (such as .Click or .Submit.). This enables UFT to run the step, as UFT thinks it is using a supported object type.

Example: For example, with the Calculator, with the Properties collection object created with the Description.Create statement, you can assign it to a WinButton object and click the different buttons:

Set des = Description.Create

Set des1 = Description.Create

Back to top

Use non-test object methods

Run methods that are not supported for a specific UFT test object by assigning the Properties collection object to a supported UFT test object that supports events.

Example: For example, with the Calculator, you can highlight the display:

Set des = Description.Create
des="window id:=150"

This will highlight the test object during the test run.

Back to top