Maintaining description properties

Relevant for: GUI tests and components

As applications change, you may need to change the property values of the steps in your action or component. Suppose an object in your application is modified. If that object is part of your action or component, you should modify its values so that UFT can continue to identify it. For example, if a company Web site contains a Contact Us hypertext link, and the text string in this link is changed to Contact My Company, you need to update the object's details in the object repository so that UFT can continue to identify the link properly (assuming that the text property is included in the test object's description).

If you are using an Insight object and the text is included in the test object image, you might need to update the test object so that UFT can continue to identify it. You can modify the test object's image to include the updated text, or you can add a similarity description property to the test object description, or lower the property's value, to enable UFT to match the test object with the object in the application despite the differences in the text.

Specify or modify property values

You can:

  • specify or modify values for properties in the test object description by using a constant value (either a simple value or a constant value that includes regular expressions) or a parameter

  • change the set of properties used to identify that object.

  • automatically update the description of one or more test objects in your object repository based on the actual updated object properties in your application

Back to top

Update description properties from an object in your application

You can update a test object in your object repository by selecting the corresponding object in your application and relearning its properties and property values from the application. When you update a test object description in this way, all currently defined properties and values are overwritten. An Insight test object's image is not updated.

The updated object description is based on the current definitions in the Object Identification Dialog Box. Only the object-specific comments, if any, are retained.

This is useful if an object's properties have changed since you added it to the object repository, since UFT may not be able to recognize the object unless you update its description.

Back to top

Restore default mandatory properties for a test object

You can restore the default properties for a selected test object. When you restore the default properties, it restores the mandatory property set defined for the selected object class, based on the settings that were set in the Object Identification Dialog Box at the time the object was learned.

If you added or removed properties to or from the description, those changes are overwritten. However, if property values were defined or modified for any of the mandatory properties, those values are not modified when you choose this option. In addition, restoring the default mandatory property set does not change the values for the ordinal identifier or Smart Identification settings for the test object.

Back to top

Rename test objects

When an object changes in your application, or if you are not satisfied with the current name of a test object for any reason, you can change the name that UFT assigns to the stored object. You can also provide test objects with meaningful names to assist users in identifying them when using them in steps.

Renaming a test object does not affect the way UFT recognizes the object in your application, as the test object name is not included in the test object description.

If you do not want to automatically update test object names in the action or component for all occurrences of the test object, you can clear the Automatically update test and component steps when you rename test objects check box in the General pane of the Options dialog box (Tools > Options > GUI Testing tab > General node).

Back to top

Add properties to a test object description

You can add to the list of properties that UFT uses to identify an object. For each object class, UFT has a default property set that it uses for the object description for a particular test object. You can use the Add Properties Dialog Box to change the properties that are included in the test object description.

Adding to the list of properties is useful when you want to create and run tests or components on an object that changes dynamically. An object may change dynamically if it is frequently updated, or if its property values are set using dynamic content (for example, from a database).

You can also change the properties that identify an object if you want to reference objects using properties that UFT did not learn automatically when it learned the object.

Back to top

Define new description properties

You can add any valid description property to a test object description, even if it does not appear in the Add Properties Dialog Box.

Back to top

Add ordinal identifiers

An ordinal identifier assigns a numerical value to a test object that indicates its order or location relative to other objects with an otherwise identical description. This ordered value provides a backup mechanism that enables UFT to create a unique description to recognize an object when the defined properties are not sufficient to do so.

Back to top