Identify unsupported objects in test runtime
UFT One 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 test objects
Static objects exist in the application, but typically cannot be selected or have data entered into them automatically. Since UFT One 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 One to identify.
The property you specify must be a real UFT One 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 description property using a static programmatic description, and a statement to set the value.
This Properties collection object can now be identified by UFT One.
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 One 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 One to run the step, as UFT One 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 One test object by assigning the Properties collection object to a supported UFT One 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.