Supporting a Custom Control > Map to Controls Tab (Test Object Class Designer)

Map to Controls Tab (Test Object Class Designer)

This tab enables you to define rules that indicate the types of controls this test object class supports. It also enables you to test the rules that you create.

You can create browser-specific tabs with different rules to support different types and versions of browsers. Each browser-specific tab contains three rule creation panels, in which you can create a set of rules that UFT uses in different ways.

Each Rule Creation Panel contains options you can use to create, edit, and test the set of rules in that panel.

To access
  1. In the Class View, add a new test object class or double-click an existing one.

    The test object class designer opens.

  2. In the test object class designer, select the Map to Controls tab.

Important information
  • Make sure to visit each tab in the test object class designer to ensure that all of the test object class details are defined correctly.

    A red asterisk next to the name of the tab acts as a reminder that you have not yet visited this tab.

  • If you need to create HTMLTags elements to improve your Web Add-in Extensibility performance, you must define these manually in the XML files. If the toolkit configuration XML file contains HTMLTags elements they are not displayed in this tab.

Relevant tasks

How to Map a Test Object Class to Application Controls

See also

User interface elements are described below (unlabeled elements are shown in angle brackets):

UI Elements

Description

<browser-specific tabs>

A strip of tabs, each containing the mapping rules for UFT to use when running on a specific browser type and version.

To add a new tab, click the Add Browser-Specific Rules tab. To remove a tab, click the Delete button on the tab.

The rules in the Default Rules tab are used for all supported browsers that do not have a specific set of rules defined.

The rules in other tabs are used for the browser specified on the tab. If a browser version is specified, the rules are used when running on browsers of the specified type, whose version is the same or later.

<rule creation panels>

A set of panels in which you can create sets of mapping rules. For details on creating and testing the rules, see Rule Creation Panel.

Stored in: Conditions elements in the toolkit configuration XML file. The type attribute of the element is determined by the panel in which you create the rules:

  • Identify Control panel -> IdentifyIfPropMatch type

  • Call Identification Function panel -> CallIdFuncIfPropMatch type

  • Ignore Control panel -> SkipIfPropMatch type

For details on how UFT uses the different types of rules, see the section on teaching UFT to identify the test object class to use for a custom Web control in the Micro Focus UFT  Web Add-in Extensibility Developer Guide.

Identification file name

The file that contains the identification function (optional).

You cannot modify this value directly.

Use the Import File button to browse to and select the relevant file.

Use the Clear button to clear the edit box.

The corresponding XML attribute in the toolkit configuration XML file is cleared, but the JavaScript file is not removed from the project.

Default: The Default implementation file defined in the General tab

Stored in: Identification element in the toolkit configuration XML file

Import File. Enables you to browse to and select a JavaScript file.

The file must be located in the project's JavaScript folder to be properly deployed. Therefore, if you select a file from another location, a local copy of the file is immediately created in the JavaScript folder.

If the file that you import has the same name as an existing file in this folder, Extensibility Accelerator appends a period (.) and a number to the imported file name (before the .js file extension).

Identification function name

The function that you implement to help identify the controls for which to use this test object class. This function is necessary only if you cannot create a set of rules that identifies the controls specifically enough.

Use the Implementation Code button to open the relevant JavaScript file to the specified JavaScript function. If the function does not exist, a JavaScript function stub is added to the file.

Note: In this edit box, you can enter only English letters, numeric characters, hyphens, and underscores. The first character must be a letter.

Stored in: Identification element in the toolkit configuration XML file

Test All Rules

Highlights all of the controls that match the mapping rules in all open Web applications.

The rules from each tab are applied to the corresponding open browsers, using the same logic that UFT uses to identify the test object class to use for a custom Web control.

In addition, when the defined rules warrant it, the identification function that you implemented is also called to assist in identification of the relevant controls.

For details, see the step Test your mapping rules on an application and update them if necessary in How to Map a Test Object Class to Application Controls.