Open topic with navigation
The Custom Support Test Object Methods screen displays the test object methods defined for the test object class you mapped to the custom control. You use this screen to select test object methods whose support you want to implement or override with new functionality and to add new test object methods.
When you click Next, one of the following screens open:
If you are creating support for an AWT-based custom control, the Custom Control Recording Support Screen opens.
If you are creating support for an SWT-based custom control, and you mapped a new test object class to the custom control, the New Test Object Class Details Screen opens.
If neither of the previous conditions is met, the Custom Control Support Class Summary Screen opens.
The left pane displays all of the test object methods that are defined for the test object class you selected and are implemented by the base support class. These are the test object methods that will be inherited by the support class you are creating. You select any test object methods whose support you want to override with a different implementation.
When the wizard creates the support class file, it adds a support method stub, named <test object method name>_replayMethod, for each test object method you selected. The support method stubs return the same values as the support methods in the base support class. You can implement the new support methods to match the needs of your custom control.
Note: If you selected the Same as base support class option in the Test Object Class Selection Screen, the wizard does not know which test object class is mapped to the custom control. As a result, no test object methods are displayed in the left pane. After the wizard creates the new support class, you can override any of the replay methods that it inherits from the base support class by adding them to the class manually.
The right pane displays the test object methods that are defined in the test object class you selected, but are not supported by the base support class.
You can modify the list in this pane using the Add, Remove, and Modify buttons.
Note that modifying the name of a method is equivalent to removing the method and adding a new one. For more information, see Understanding the Test Object Method Dialog Box.
Tip: To add test object methods after the support class is created, use the Add Test Object Method button or select UFT > Add Test Object Method in Eclipse.
For each of the test object methods in this pane, the wizard adds support method stubs to the support class it creates. The support method stubs return the error value Retval.NOT_IMPLEMENTED until you implement them to match the needs of your custom control.
If you add test object methods to this list, the wizard adds them to the test object class definition in the test object configuration file. For information on the structure and content of this file, see the UFT Test Object Schema Help.
Note: If you selected the Same as base support class option in the Test Object Class Selection Screen, the wizard does not know which test object class is mapped to the custom control. As a result, no test object methods are displayed in the right pane. If you add a test object method, the wizard adds the appropriate replay method stub to the support class it creates. However, the test object method is not added to any test object class definition.
If you add test object methods to this list, they are added to the existing test object class. This means that the new methods appear in UFT for all test objects of this class, regardless of whether or not they are supported for these objects. In a UFT GUI test, if you call a test object method for an object, and that method is not supported, a run-time error occurs.
Therefore, if you plan to add test object methods to support a custom control, it is recommended to create a new test object class based on the existing one, instead of using the existing test object class.
If you remove a test object method from this list, it is no longer supported for this custom class. However, it is still part of the test object class definition. Therefore, it still appears in the list of test object methods in UFT.
If you use this test object method on a custom control in UFTGUI tests, a run-time error occurs. For example, although a drop-down-list control is supported as a List test object, if you select the select_range test object method for a drop-down-list control, and it is not supported, a run-time error occurs.