Object Name Mapping Dialog - Basic Mode

Applies to TestComplete 15.70, last modified on December 11, 2024

When the Object Name Mapping dialog is in the Basic mode, you can specify mapping criteria for an application object as a set of identification properties and values. (You can switch the mapping modes in the bottom left corner of the dialog.)

Object Name Mapping dialog - Basic mode

The Mapped Name box holds the name that will be used to address the object in tests. TestComplete generates the name automatically based on the object’s type and text, native name or both. You can change the default name if needed (for example, you can specify a more descriptive name). Mapped object names can contain only letters (A..Z, a..z), digits (0..9) and underscore characters (_) and must start with a letter.

You can also describe the mapped object in the Description box.

The Selected list (on the left) shows the current identification properties and values of a mapped object. By default, this list holds the default properties and values that TestComplete considers sufficient for object identification or, if there is a name mapping template that matches the current object, the properties defined in this template. The Available list (on the right) shows all the properties the object has (except for those specified in the Selected list). You can add and remove properties to and from an object’s mapping criteria by moving the properties between the lists using the arrow buttons.

Which object properties are available

Once you have specified necessary mapping criteria for the object, click OK or Skip to close the dialog and map the object. Clicking OK will map the object and create an alias for it, while clicking Skip will map the object without creating an alias.

Note: You can manually define aliases for the mapped objects later in the Name Mapping repository. For more information, see Add Aliases.

To close the dialog without mapping the object, click Cancel.

To add a property to mapping criteria

To add a new property to an object’s mapping criteria, select that property in the Available list and then click or double-click the property.

To add all the available properties to the mapping criteria, click .

Note: Properties that return an object (such properties are usually displayed as (Object) and have the ellipsis button) cannot be used in mapping criteria. However, properties of those returned objects can be used in mapping criteria. To add such a property to mapping criteria:

  1. Click the ellipsis button in the object value cell to access the properties of that object.

  2. Add the necessary properties to the mapping criteria as described above.

  3. Once you add the desired properties, click to return to the list of properties of the original tested object.

It may take a lot of time for TestComplete to retrieve some property values (for instance, the VisibleOnScreen property). Using such properties as a name mapping criterion may affect your test performance, especially if you use them when performing an extended search. We do not recommend that you use such properties when mapping objects.

To specify a value for an identification property
  1. Select an identification property in the Selected list.

  2. Click the ellipsis button in the property value cell.

  3. In the resulting Edit Property Value dialog, specify the needed value. You can specify the property value as:

    • A constant. You can use wildcards to indicate the variable parts of the value: the asterisk (*) matches zero or more characters, the question mark (?) matches any single character.

    • A regular expression (precede it with the regexp: prefix, for example, regexp:List[\w+\d+]).

    • A project variable.

To remove a property from mapping criteria

To delete an identification property from mapping criteria, select that property in the Selected list and then click or double-click the property.

To delete all the properties from mapping criteria, click .

To quickly find a property in the list

Objects (especially in Open Applications) can have a lot of properties. To quickly find the needed property in the list, you can do any of the following:

  • Select any property name in the list, and then type the initial characters of the property name.

    TestComplete will select the first property whose name starts with the typed characters.

– or –

  • Type the search text in the search box, or select one of the previously searched items from the list.

    TestComplete will filter the property list to display only those properties whose names contain the search text.

    View image

    To remove the current filter, click the button in the search box or clear the search text.

To select a mapping template

Instead of setting identification properties manually, you can use a name mapping template for mapping. The template defines custom mapping criteria, that is, it helps you quickly set up multiple properties at once. To apply the template, click Templates, and then choose the needed template in the dialog:

Select a template when mapping controls manually

Click the image to enlarge it.

The dialog lists all the mapping templates matching the object being mapped. If no templates are available, you can create a new one. See Create name mapping templates for details.

To enable or disable extended search criteria

If the object’s position in the application hierarchy may change, you can use extended search to map the object. Select the Find this node on any level of Name Mapping tree check box. TestComplete will be able to find the object in the application even if the object’s parents are not mapped. To learn more, see Name Mapping - Extended Search.

Note: You can also change this setting later in the Extended Find column of the Name Mapping repository.
To highlight an object on screen

To quickly identify the object that is currently being mapped in the application, click Highlight. TestComplete will highlight the object with a flashing red frame on the desktop screen or in the Mobile Screen window.

See Also

Object Name Mapping Dialog
Name Mapping
Name Mapping Templates
Mapping Objects Manually

Highlight search results