A test object description consists of the object's name and a set of identification properties that, when combined, uniquely identify a specific user interface object. The test object descriptions must uniquely identify different test objects that belong to the same parent. The test object description is stored with the UFT One GUI test and is used to identify the specific object.
The test object's name needs to be meaningful to the UFT One user, preferably using terminology that is relevant to your technology or environment. UFT One displays this name in the Keyword View, in the Editor, and in the object repository. This name is not used for object identification and therefore does not have to remain constant in the application.
For example, the test object name can be language-dependent. The UFT One user can create a test with the application running in one language, creating test objects with names in that language. The user can then run the test on the same application in another language. The names of test objects in the test remain in the original language, but UFT One can correctly recognize the test objects based on their description.
The description must include the following items that are used to uniquely identify the object:
The test object class.
Properties that remain consistent over time. Do not use properties that change while the application runs, or properties that have different values in different run sessions of the application.
For example, consider a check box displaying the label show picture. This check box has the following properties:
The label property contains the text displayed on the screen. This is not an appropriate property to use for the test object description because it is language dependent.
The boolean property selected indicates whether or not the check box is selected. This is not an appropriate property to use for the test object description because its value changes from time to time.
The Name property for this check box is show_pic. This property can be used in the description of the check box test object because it uniquely identifies this specific check box.
The object description must be provided in XML format according to the AppDescription Schema.
The description must include the test object class, the names and values of all of the identification properties that are part of the test object description, and a test object name. In addition, the description must recursively describe all of the selected object's parents, up to the root of the hierarchy that the Testing Agent supports. For each parent object that is described, all of the information described above must be provided.
In the testing environment XML, set the ForDescription attribute to true for any identification property that you include in the description.
For more information, see Implementing BuildDescription: Map an Object ID to a Description.