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
-
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 the properties TestComplete uses to identify your tested object have different values, TestComplete will not be able to find the object.
When TestComplete fails to find a tested object during the test run, it does the following:
-
Posts the 'The object does not exist' error message to the test log.
-
Analyzes the tested application and searches for similar objects:
-
It checks all the objects on the same level of the hierarchy where the missing object resides. If the Extended Find is enabled, it also checks all the objects down the hierarchy levels.
-
It checks whether the mapping criteria of the missing object have been changed. TestComplete searches for similar objects among objects of the same class and type as the missing one.
-
Among all similar objects that TestComplete finds, it selects 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 show the Intelligent Fix button on the Additional Information 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.