Open topic with navigation
A test object has identification properties and test object methods. Test objects can be simple, with general test object methods, or they can be complex, with specific test object methods that represent business logic.
Define test objects and test object methods that reflect the operations that a user would perform in the application. For example, if an application contains a table made up of edit box cells, use one test object to represent the table, rather than a collection of test objects each representing a cell. Operations on a table test object can be performed on specified rows, columns, or cells, or on the table as a whole.
Test object class name and test object class attributes, including a generic type, a base class, filter level, and more.
Generic type. The generic type of the test object class. For example, for WinEdit and WebEdit test objects, the generic type is Edit. Generic types are used to create groups of similar test object classes for use when filtering objects (for example, in the Add Object to Object Repository and Select Object for Step dialog boxes) and when creating documentation strings for the Documentation column in the Keyword View. For more information, see Mapping a Test Object Class to a UFT Generic Type.
For a list of available generic types, see the list of keys in the registry location:
Base class. A test object class that the new test object class extends. If one test object class extends another, the identification properties and test object methods of the base class appear in the UFT Keyword View and Editor as available for the new test object class. However, you must implement support for each identification property and for each test object method in the new test object class.
Filter level. Specifies whether this type of object is learned by default as a descendant when its container is added to the object repository. In other words, whether this type of object is selected by default in the Select Object Types dialog box.
If you define a test object class that does not have to appear in a test, you can define this class to be filtered out of the Learn process so that the user does not have to remove it manually.
Helpinfo. The context-sensitive help topic to open when F1 is pressed for this type of object in the Keyword View or Editor.
The icon file that UFT uses for this test object class (optional). The file can be a .dll or .ico file. If not defined, a generic icon is used.
Test object methods that can be performed on test objects of this class, including the following information for each method:
Arguments, including the argument type and direction (
Out). For each argument, you can specify whether the argument is mandatory, and if not, you can specify its default value.
Method Description, shown in UFT as a tooltip in the Keyword View, Editor, and Step Generator.
Documentation string, shown in UFT in the Documentation column in the Keyword View and in the Step Generator.
Helpinfo, the context-sensitive help topic to open when F1 is pressed for the method in the Keyword View or Editor, or when the Operation Help button is clicked for the method in the Step Generator.
Return value type.
ExposureLevel, indicating whether this method is available only to Automation Engineers using UFT or also to Subject Matter Experts using Business Process Testing.
Note: All UFT common methods and properties can be performed on all Testing Extensibility test objects, as long as you implement all of the necessary interface methods defined in the UFT Extensibility Agent type library. Do not override the definitions of the UFT common methods and properties, or their implementation. For a list of the common methods and properties supported by UFT, see the Micro Focus UFT Object Model Reference for GUI Testing.
For more information, see Naming Test Object Classes and Test Object Methods and Properties.
Default test object method. The test object method that is selected by default in the Keyword View and Step Generator when a step is generated for an object of this class.
Identification properties. Identification properties are characteristics of the test object that can be checked in a checkpoint within a UFT test.
Note: UFT uses the names Index, Location, and CreationTime internally; therefore, they must not be used for test object identification properties.
A subset of the identification properties comprise the object's description, which is used to uniquely identify the object in the application. These are the description properties.
You can also specify:
The set of identification properties that comprise the test object description for objects of this class
Note: Description properties must be 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.
The identification properties that are available for use in checkpoints and output value steps that are created in UFT for objects of this class
The identification properties that are selected by default in the Checkpoint Properties dialog box in UFT when checkpoints are created for objects of this class
For more information, see Teaching UFT to Recognize the Testing Environment.