Developing The Basic UFT Testing Agent > Developing Support for the Test Object Model > Implement GetDisplayName: Return an Object's Name

Implement GetDisplayName: Return an Object's Name

When you define a test object description according to the AppDescription Schema, the description includes a test object name. Implement the GetDisplayName method to return this name based on the object ID that UFT passes to the method.

UFT displays the test object name in the Keyword View, in the Editor, and in the object repository. Use descriptive and distinct names that enable the UFT user to identify the object that this test object represents in the application.

The test object name is not used for object identification. However, it must be unique among the test objects within the same parent. If GetDisplayName returns a name that is already used for another child of the same parent object, UFT adds an index to make it unique. For example, MyButton_1.