Articles

[Collapse]TestComplete/viewarticle/65670/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Collapse]Using TestComplete/viewarticle/57875/
  [Expand]TestComplete User Interface, Projects and Settings/viewarticle/57876/
  [Collapse]Creating, Recording and Running Tests/viewarticle/56646/
   [Collapse]Naming Objects/viewarticle/56265/
    [Expand]Default Object Naming/viewarticle/56291/
    [Collapse]Name Mapping/viewarticle/55035/
      About Name Mapping/viewarticle/55236/
     [Expand]Name Mapping Editor/viewarticle/63999/
     [Collapse]Managing Mapped Objects/viewarticle/57313/
      [Expand]Adding Objects to the Name Mapping Repository/viewarticle/56630/
      [Collapse]Modifying Mapping Criteria/viewarticle/56657/
        Adding and Removing Identification Properties/viewarticle/56658/
        Changing Identification Property Values/viewarticle/57310/
        Using Conditional Mapping Criteria/viewarticle/55608/
        Specifying Required Child Objects/viewarticle/56656/
        Using Extended Search Criteria for Mapped Object Identification/viewarticle/55674/
       Saving Information on Methods and Properties of Mapped Objects/viewarticle/57314/
       Renaming Objects in the Name Mapping Repository/viewarticle/57336/
      [Expand]Deleting Objects From the Name Mapping Repository/viewarticle/57312/
       Changing the Mapped Objects' Hierarchy/viewarticle/57334/
       Specifying a Description for Mapped Objects/viewarticle/57337/
      [Expand]Locating Mapped Objects/viewarticle/57325/
       Merging Name Mapping Files/viewarticle/55712/
       Updating Name Mapping During Test Run and at Design Time/viewarticle/55793/
      Working With Mapped Objects in Tests/viewarticle/57338/
     [Expand]Name Mapping Templates/viewarticle/55159/
     [Expand]Name Mapping Configurations/viewarticle/55105/
   [Expand]Creating Tests/viewarticle/57373/
   [Expand]Managing Tested Applications/viewarticle/57435/
   [Expand]Checkpoints and Stores/viewarticle/56266/
   [Expand]Running Tests/viewarticle/56462/
   [Expand]Handling Playback Errors/viewarticle/56641/
   [Expand]Keyword Testing/viewarticle/55462/
   [Expand]Scripting/viewarticle/56245/
   [Expand]Test Visualizer/viewarticle/55007/
   [Expand]Exploring Applications/viewarticle/55055/
   [Expand]Debugging Tests/viewarticle/56567/
  [Expand]Test Results/viewarticle/55010/
  [Expand]Enhancing Tests/viewarticle/56964/
  [Expand]Teamwork and Integration Into QA Process/viewarticle/57266/
  [Expand]Extending TestComplete/viewarticle/57655/
  [Expand]Automating TestComplete/viewarticle/57438/
  [Expand]Best Practices/viewarticle/64008/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Expand]References/viewarticle/57878/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 11/26/2014 Applies To: TestComplete 10 Rating: GoodGoodGoodGoodGood 4 vote(s) Click to rate: PoorNot badAverageGoodExcellent
Modifying Mapping Criteria

Using Extended Search Criteria in Name Mapping Repository

Name Mapping has an object-specific option, Extended Find, that makes TestComplete search for an object on all levels down the application’s object hierarchy. Extended Find is typically used when an object has dynamic parent objects, and these parent objects are not included in Name Mapping.

If the Use extended find when possible option is enabled, TestComplete maps web objects by using the Extended Find feature. For objects of other application types, you can configure the Extended Find option manually as explained in this topic.

How to Enable Extended Search

First, add the Extended Find column to the Name Mapping editor:

  • Right-click somewhere within the Mapped Objects pane and select Field Chooser from the context menu. This will open the Customize window with the list of the available columns.

  • Drag the Extended Find column to the Mapped Objects pane.

  • Close the Customize window.

To enable Extended Find for an object, do the following:

  • In the Mapped Objects tree, drag the object to the closest non-dynamic parent object.

    Dragging a mapped object up the object tree
  • Select the Extended Find check box for the object.

  • If a confirmation dialog appears, click Yes.

  • In the Aliases tree, drag the object’s alias to the matching parent alias (like you did in the Mapped Objects tree).

  • Delete unneeded intermediate objects from the Mapped Objects and Aliases trees. To delete an object, right-click it and select Delete from the context menu.

Remember to update the object names in your tests after you change the Name Mapping structure.

When to Use Extended Search

Dynamic Object Hierarchy

In dynamic applications, the same object can be at different positions in the object hierarchy in different application states.

An object moving through the object hierarchy
An object moving through the object hierarchy

To correctly identify the “moving” objects, you need to ignore their dynamic parent objects. To do this, map a "moving" object (in the example above it is Panel("Dock1")) to the closest non-dynamic parent object (Table(0) or Panel("BackgroundZone")) using Extended Find.

Non-Unique Parent Objects

Some objects have no unique properties. For example, the DIV and TABLE elements used to lay out web pages are often identified only by indexes, and these indexes can be dynamic.

You can exclude non-unique parent objects from Name Mapping to make child object identification more robust. You need to turn on Extended Find for each object whose direct parent object is not included in Name Mapping.

Too Long Aliases

Large applications can have a highly nested object hierarchy. As a result, the object aliases in the default generated Name Mapping repository can be very long. This can be an issue if you create tests manually.

You can use the Extended Find option to exclude intermediate objects from Name Mapping and shorten the aliases.

Name Mapping for a web application without Extended Find (on the left) and with Extended Find (on the right)
Name Mapping for a web application without Extended Find (on the left) and with Extended Find (on the right)

In the example above, the full alias of the linkLogout object is as follows (the differences are marked with blue):

  • Without Extended Find:

    Aliases.browser.pageWebOrders.formAspnetform.table.cell2.panelLoginInfo.textnode.linkLogout
  • With Extended Find:

    Aliases.browser.pageWebOrders.formAspnetform.linkLogout

Notes

  • Extended Find searches down the entire object hierarchy. The search is not depth-limited.
  • Searching for objects in large applications may take a long time. If you get warnings in the test log that a search takes too much time, try doing the following:

Alternatives to Extended Find

Instead of using Name Mapping with Extended Find, you can search for objects from tests:

In this case, you specify the identification properties and values directly in your test. Also, the FindChild method lets you limit the search depth to make the search faster.

For more information on using the search methods, see these topics:

See also
Modifying Mapping Criteria | Using Conditional Mapping Criteria | Specifying Required Child Objects | Name Mapping | About Name Mapping Editor


© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document