Mapping Objects Automatically

Applies to TestComplete 15.64, last modified on June 12, 2024

By default, TestComplete adds objects to the Name Mapping repository automatically when you –

This behavior is controlled by the Engines > Name Mapping > Map object names automatically option of TestComplete:

Configuring the project to map object automatically

If you do not use the Name Mapping repository in your project, you can disable this option to prevent TestComplete from mapping objects.

To enable or disable automatic name mapping
  1. Select Tools > Options from the TestComplete main menu. This will open the Options dialog.

  2. Select the Engines > Name Mapping category.

  3. Select or clear the Map object names automatically check box.

  4. Click OK to save the changes.

  • Whether TestComplete uses XPath expressions and CSS selectors to map web objects depends on the Use XPath and CSS selectors for web objects property of your current project. By default, the property is enabled:

    Configuring the project to map web object by using CSS selectors or XPath expressions

    Click the image to enlarge it.

    This property must be enabled if you are creating a cross-platform web test.

    When this property is enabled, locating web objects by identification properties is not supported. If, in your project, you already have existing web tests that rely on identification properties, those tests may fail.

  • Whether TestComplete uses selectors to map mobile objects depends on the approach implemented in your mobile tests. TestComplete maps objects in mobile applications running in the BitBar cloud or in a local Appium cloud by using selectors. Objects in applications running on mobile devices connected to TestComplete locally (the legacy approach) are always mapped by property-value pairs:

    Selecting the mobile testing approach

    Click the image to enlarge it.

  • When TestComplete maps objects by a combination of property-value pairs, you can control which properties it should use by creating name mapping templates. See Name Mapping Templates.

  • Mapping objects automatically during the test recording is the easiest and fastest way to map multiple objects.

  • TestComplete can store information on the properties and methods of mapped objects to the Name Mapping repository. This way, you will be able to view the properties and methods of mapped objects in test editors even if your tested application is not running. See View Code Completion Information.

  • TestComplete can capture images of mapped objects. This helps you understand to which UI element of your tested application the mapped object corresponds. See Store Images.

See Also

Adding Objects to the Name Mapping Repository
Name Mapping
Mapping Objects Manually
Mapping Objects From Tests

Highlight search results