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 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.
Use a Description.Create statement to create a Properties collection object.
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"
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" Window("Calculator").Static(des).Click
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 des="text:=1" Window("Calculator").WinButton(des).Click Set des1 = Description.Create des1="text:=2" Window("Calculator").WinButton(des1).Click
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" Window("Calculator").Static(des).Highlight
This will highlight the test object during the test run.