Name Mapping Options Dialog

Applies to TestComplete 14.61, last modified on April 22, 2021

These options affect the Name Mapping project item.

To call the dialog:

  1. Select Tools > Options from the TestComplete main menu

  2. Select Engines > Name Mapping from the tree displayed on the left side of the resulting Options dialog.

You can configure the following options:

  • Map object names automatically - If this option is enabled, TestComplete automatically generates custom names for objects that you are working with and have not yet been mapped. This happens in the following cases:

    • During test recording. TestComplete detects which windows and controls you are performing actions over and maps them if they have not been mapped.

    • When adding keyword test operations that work with objects and processes in your keyword tests (for instance, when you are adding the On-Screen Action operation and using the target glyph to specify the desired object on screen.

    • When creating checkpoints, for instance, when you create a property or region checkpoint and use the target glyph to specify the desired object or window.

    Objects are not mapped when you use the target glyph in the Object Browser panel or in the Object Spy window.

  • Search for visible objects first - This option tells TestComplete to prefer visible over invisible objects when searching for mapped objects. If it is enabled (by default), TestComplete first tries to find a matching object that is also visible. If a visible object is not found within the search timeout (Auto-wait timeout or the timeout used in WaitAliasChild), TestComplete picks any invisible object that matches the mapping criteria.

    If this option is disabled, TestComplete always picks any matching object, whether visible or not.

    Notes:

    • Disabling this option can reduce the object search time in tests that deal with many invisible objects.

    • This option has no effect for objects whose mapping criteria explicitly include the Visible property.

    • This option has no effect on self-healing tests.

    • This option has no effect for web objects mapped by using XPath expressions and CSS selectors.

    • If you upgraded from TestComplete 10 to version 14 and found that your tests became slower, disable this option.

  • Update Name Mapping during test run - Specifies what TestComplete does when it cannot identify a mapped object during the test run. If the option is enabled, TestComplete displays the Update Name Mapping wizard that helps you resolve the object identification issue. Otherwise, if this option is disabled, TestComplete posts an error to the test log. See also Update Name Mapping During Test Run.

  • Use extended find when possible - This option affects the structure of web application objects in Name Mapping.

    If it is disabled, TestComplete generates full detailed Name Mapping for web pages, including all intermediate nested elements.

    If this option is enabled, TestComplete generates Name Mapping without containers that are used exclusively for layout and do not affect identification of tested web objects. Examples of such containers are divs and tables. This reduces the amount of nested containers in Name Mapping and makes it more compact and easier to manage. Note that some containers can still be included in Name Mapping if they are needed for unique identification of their child objects. For more information, see Mapping Web Elements With Extended Find Enabled.

    Test objects whose parent containers are not included in Name Mapping have the Extended Find setting enabled.

    Note: The Use extended find when possible option has effect only when new web objects are added to Name Mapping. It does not change the existing Name Mapping structure.

    The following images illustrate Name Mapping generated with this option enabled and disabled.


    Use extended find when possible: Checked

    Use extended find when possible: Unchecked
  • Enable Self-Healing mode - Starting from version 14.40, this option is available only if you have the Self-Healing Tests plugin enabled. If this option is enabled (by default) and TestComplete fails to find a tested object during the test run, it will try to find a similar object and use it to continue running the test. After the test run is over, TestComplete will suggest updating the object’s recognition parameters to match those of the found object. If the option is disabled, TestComplete will report the “The Object Does Not Exist” error.

    Note: This option is ignored if your TestComplete project is configured to locate web objects by XPath expressions or CSS selectors. In this case, TestComplete will only report the error. It will not search for a similar object.

  • Collect usage statistics - If this option is enabled, TestComplete collects information on whether Name Mapping items are used in tests or not. You can then use this data to find and remove unused objects to clear the Name Mapping repository.

    In the Statistics file text box, you specify a file that will store the collected data. You can type the file path or click the ellipsis button and browse for the file in the Open dialog. By default, the file name is like C:\Users\Public\Documents\NameMappingUsage.stat. You may need to specify some other file located in a shared folder.

    For information on selecting the file name and gathering statistics, see Find and Remove Unused Mapping Items.

    To clear the collected data, click Clear Statistics.

See Also

TestComplete Options
Name Mapping

Highlight search results