The Name Mapping repository stores all your tested objects with identification criteria that TestComplete uses to find the objects in applications. By default, TestComplete uses one or more property-value pairs to identify the objects:
|Note:||For testing Web Applications, you can change the list of basic mapping criteria that TestComplete applies for object identification by default. As additional criteria, you can use any custom attributes. For more information, see Using Custom Attributes as Name Mapping Criteria for Web Testing.|
Usually, when mapping objects, TestComplete tries to choose the properties that will identify the objects in the application uniquely. However, there can be situations where you may want to add extra properties to the identification criteria or to remove unnecessary properties. You can also change the property values, for example, to match changes in your tested application.
Before adding identification properties to a mapped object, make sure your tested application is running and the object currently exists in it.
Locate the object in the Name Mapping repository.
Double-click the object. TestComplete will open the Edit Name Mapping Item dialog that lists all the properties used to identify the object:
In the Available list on the right, select the property you want to add and click .
You can set a property value using:
Wildcards (* and ?).
A regular expression (precede the expression with the
regexp: prefix, for example,
To add a nested property (for example,
Select the first item (in our example -
NativeClrObject) in the Available list on the right and click the ellipsis button in the property value cell.
Select the second item (in our example -
Name) and click .
Add more properties, if needed.
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.
Select an object in the Name Mapping repository. You will see the object’s identification properties on the right.
Right-click the property you want to delete and then click Delete.
Select an object in the Name Mapping repository. It will show the identification properties on the right.
Select a property, press F2 and then click the ellipsis button in the property value cell. The Edit Property Value dialog will appear:
In the dialog, specify a new property value:
To use a constant value:
Select Constant from the Mode drop-down list.
Enter the property value in the Value text box.
|Tip:||You can use wildcards (* and ?) or regular expressions to mask the dynamic parts of string values. For example, instead of Afx:TabWnd:3f9f0000:8:10005:10, use Afx:TabWnd:*.|
To use a project variable as the property value:
Select Project Variable from the Mode drop-down list.
Select a variable from the Type list. The variable value will be shown in the Value box.
|Note:||Only String, Integer, Double and Boolean variables can be used as identification property values.|