To find objects with which your tests interact, TestComplete uses various object properties that uniquely identify objects in the application (for example, an object type, class name, identifier, and so on). If during the test run the object’s actual properties differ from the properties your project’s Name Mapping repository specifies, TestComplete will not be able to find the needed object, and your test will fail.
The Update Recognition Attributes dialog helps you update identification properties used to find a tested object in an application.
When the dialog is available
Important: The dialog is available only if the Enable Self-Healing mode option is disabled in TestComplete. Otherwise, TestComplete will update the identification properties automatically, and the dialog will not be available.
-
During the test run, to find a tested object in an application, TestComplete compares its properties specified in the Name Mapping repository with the actual properties in the tested application.
-
If the tested application has changed and TestComplete cannot find the object, it will do the following:
-
Analyze the tested application and search for similar objects:
-
It will check all the objects on the same level of the hierarchy where the missing object resides. If the Extended Find is enabled, it will also check all the objects down the hierarchy levels.
-
It will check whether the mapping criteria of the missing object have been changed. TestComplete will search for similar objects among objects of the same class and type as the missing one.
-
Among all similar objects that TestComplete will find, it will select the one closest to the missing object by comparing them to the missing object’s screenshot that the Name Mapping repository stores (if any).
-
-
If a similar object is found, TestComplete will post the “The object does not exist” error message to the test log and add the Intelligent Fix button to the Details panel of the error message:
-
-
Click the button to call the dialog.
How to update recognition attributes
The Update Recognition Attributes dialog shows the image of your tested application with the found similar object highlighted:
Look at your tested application and check whether the found object is the needed missing object. The dialog will also show a list of identification properties of the missing object with matching properties of the found object. Compare the expected and actual values.
Note: | If you use a dynamic property with variable numeric parts (for example, a build number) as a recognition attribute, Intelligent Fix will detect it and suggest replacing numerical parts with wildcards. |
To update the identification properties of the missing object, click Update.