Test Object Class Selection Screen

This topic describes the Test Object Class Selection screen in the New Custom Support Class Wizard, where you map the custom control class to the test object class used in your tests.

Overview

Use this screen to determine how your custom class is represented in tests. The selected mapping controls which methods and identification properties are available by default and whether you continue by extending an existing test object class or defining a new one.

Wizard map

Custom Class Selection Screen > Test Object Class Selection Screen > Custom Support Test Object Identification Properties Screen > Custom Support Test Object Methods Screen > Custom Control Recording Support Screen > New Test Object Class Details Screen > Custom Control Support Class Summary Screen

Screen details

In the Test Object Class Selection screen, you map the custom class to a test object class. In GUI tests, the custom class controls are represented by test objects of the selected test object class. In the custom support class, the wizard adds a to_class_attr property method that is implemented to return the test object class you select in this screen. This enables the support class to specify which test object class is mapped to the custom class.

Note: Selecting the test object class to map to the custom class is fundamental to creating a custom support class. If you make changes in later screens and then return to this screen and select a different test object class, those changes will be discarded.

Mapping options

In this wizard screen you select one of the following options:

The sections below provide details about each option.

Same as base support class

Maps the custom class to the test object class returned by the to_class_attr property method of the base support class. (If you select this option, the wizard does not add a to_class_attr method to the new support class that it creates. The new support class inherits the base support class' method.)

In the Custom Class Selection Screen, you determined the base support class, which is the support class that the new support class extends. The custom class supported by the base support class is mapped to a specific test object class. If this test object class is also a logical test object for your custom class, select the Same as base support class option.

The following examples illustrate when to select the Same as base support class option:

  • You want to support a custom control that is similar to the one supported by the base support class. Controls are considered similar if they have the same set of identification properties and test object methods, but the properties and methods are implemented differently. In this case, the test object class returned by the to_class_attr property method of the base support class is appropriate for your custom control.

  • You are creating a support class for other support classes to extend—not to support actual controls. In this case, you can select this option because it is not important which test object class you map to the custom class. To view an example of this type, see Creating Support for the ImageControl Custom Class.

Existing test object class

Enables you to map the custom class to an existing test object class that is already supported by OpenText Functional Testing. This list contains all of the supported Java object types. If you define new test object classes for custom support, they are also included in the list.

If you defined new test object classes in the current Eclipse workspace, they are displayed in this list immediately. Otherwise, new test object classes are displayed in the list only after they are deployed to OpenText Functional Testing and you reload the configuration (for more information, see Reload Support Configuration).

If you select a test object class that is not defined within your project, its test object class definition must also be deployed to OpenText Functional Testing for your support to function properly.

When you select this Existing test object class option, you must also select the appropriate existing test object class from the list.

Tip: Select this option only if this test object class includes all of the identification properties and test object methods of the custom control. If you need to add additional properties or methods, select New test object class.

New test object class

Enables you to map the custom control to a new test object class that you create. Select this option if none of the existing test object classes include all of the identification properties and test object methods of the custom control. Then enter a name for the new test object class. The test object class name must begin with a letter and contain only alphanumeric characters and underscores.

If you select this option, the Extends existing test object option is enabled.

Extends existing test object (enabled if you selected New test object class)

Each new test object class is based on an existing one, extending its set of identification properties and test object methods. All test object classes extend the JavaObject class. You can choose a more specific existing test object class to extend by selecting it from the list. This list is identical to the list of existing test object classes provided for the Existing test object class option.

Next steps

  • If you select the New test object class option, you define additional details about the new test object class in the New Test Object Class Details Screen. The wizard then adds the definition of the new test object class to the test object configuration file. For information on the structure and content of this file, see the Test Object Schema Help.