Open topic with navigation
If you map custom controls to new (or modified) test object classes, you must create one or more test object configuration files in the custom toolkit support set. For more information, see Mapping a Custom Control to a Test Object Class.
In a test object configuration XML, you define the test object classes (for example, the test object methods they support, their identification properties, and so on).
If the relevant add-in is not loaded when UFT opens, UFT does not load the information in this XML. Similarly, if the name of the environment or custom toolkit is displayed in the Add-in Manager dialog box and its check box is not selected, the information in this XML is not loaded.
For more information, see How UFT Loads the Test Object Configuration XML .
The sections below describe the information that you can include in a test object class definition.
The name of the test object class and its attributes
The test object class name must be unique among all of the environments whose support a UFT user might load simultaneously. For example, when defining a new test object class, do not use names of test object classes from existing UFT add-ins, such as
A test object class inherits the base class' test object operations (methods and properties), generic type, default operation, and icon. Identification properties are
If you create test object classes that extend test object classes defined in another toolkit support set, you create a dependency between the two toolkit support sets. Whenever you select to load the extending toolkit support set in the UFT Add-in Manager, you must also select to load the toolkit support set that it extends.
The generic type for the test object class, if
Generic types are used when filtering objects (for example, in the Step Generator's Select Object for Step dialog box and when adding multiple test objects to the object repository). Generic types are also used when creating documentation strings for the Documentation column of the Keyword View (if they are not specifically defined in the test object configuration file).
A list of operations for the test object class, including the following information for each operation:
The arguments, including the argument type (for example,
Integer), direction (
Out), whether the argument is mandatory, and, if not, its default value.
The operation description (shown in the Object Spy and as a tooltip in the Keyword View and Step Generator).
The Documentation string (shown in the Documentation column of the Keyword View and in the Step Generator).
The return value type.
A context-sensitive Help topic to open when F1 is pressed for the test object operation in the Keyword View or Editor, or when the Operation Help button is clicked for the operation in the Step Generator. The definition includes the Help file path and the relevant Help ID within the file.
The test object operation that is selected by default in the Keyword View and Step Generator when a step is generated for an object of this class.
A list of identification properties for the test object class. You can also define:
The identification properties that are used for the object description.
The identification properties that are used for smart identification. (This information is relevant only if smart identification is enabled for the test object class. To enable smart identification, use the Object Identification dialog box in UFT.)
The identification properties that are available for use in checkpoints and output values.
The identification properties that are selected by default for checkpoints (in the UFT Checkpoint Properties dialog box).
When defining identification properties, it is recommended to start by copying existing identification properties from the base object in your schema or from similar objects in related toolkits.
The path of the icon file to use for this test object class. (Optional. If not defined, the base class' icon is used.) The file can be a .dll, .exe, or .ico file.
A context-sensitive Help topic to open when F1 is pressed for the test object in the Keyword View or Editor. The definition includes the .chm Help file path and the relevant Help ID within the file.
Note: When you modify a test object configuration file, the changes take effect only after you restart UFT.
You can practice creating support for a custom control that is mapped to a new test object class in the tutorial lesson Learning to Support a Complex Control.
You can validate your test object configuration file against: <UFT installation folder>\bin\java\sdk\eclipse\plugins\com.mercury.qtjext.plugin.QTJavaExt_1.0.0\ClassesDefintions.xsd
For information on the structure and syntax of a test object configuration file, see the
For information on the location in which to store the test object configuration file, see Deploying and Running the Custom Toolkit Support.
The following example shows parts of the test object configuration file that defines the Calculator test object class definition for the javaboutique custom toolkit:
<TypeInformation Load="true" PackageName="javaboutique" AddinName="Java"> <ClassInfo BaseClassInfoName="JavaApplet"DefaultOperationName="Calculate" Name="Calculator"> <IconInfo IconFile="C:\Program Files\HPE\Unified Functional Testing\samples\Javaboutique\Calculator_3D.ico"/> <TypeInfo> <Operation ExposureLevel="CommonUsed" Name="Calculate"PropertyType="Method"> <Description>Builds the whole calculation process</Description> <Documentation><![CDATA[Perform %a1 operation with %a2 and %a3 numbers]]></Documentation> <Argument Direction="In" IsMandatory="true" Name="operator"> <Type VariantType="Variant"/> </Argument> <Argument Direction="In" IsMandatory="true" Name="num1"> <Type VariantType="Variant"/> </Argument> <Argument Direction="In" IsMandatory="true" Name="num2"> <Type VariantType="Variant"/> </Argument> </Operation> ... </TypeInfo> <IdentificationProperties> <IdentificationProperty ForVerification="true" ForDefaultVerification="true "Name="value"/> <IdentificationProperty ForVerification="true" Name="objects count"/> <IdentificationProperty Name="width"/> <IdentificationProperty ForDescription="true" Name="toolkit class"/> ... </IdentificationProperties> </ClassInfo> </TypeInformation>
This example shows that the Calculator test object class extends the JavaApplet test object class. It uses the Calculator_3D.ico icon file, and its default test object method is Calculate (which has three mandatory input parameter of type Variant:operator, num1 and num2).
The PackageName attribute in the TypeInformation element indicates that the Calculator test object class is created for the javaboutique toolkit support.
The following identification properties are defined for the Calculator test object class:
value. Available for checkpoints and selected by default in the Checkpoint Properties dialog box in UFT.
objects count. Available for checkpoints but not selected by default.
toolkit class. Used for the test object description but not available for checkpoints.