Message - Object 'Object_Name' was replaced with a similar object

Applies to TestComplete 15.70, last modified on December 17, 2024

About the warning message

Before simulating a user action over an object in a tested application, TestComplete first finds that object in the system. To do this, it uses the recognition criteria set for the object in the Name Mapping repository. If TestComplete finds the object that matches the criteria completely, it simulates the action.

If TestComplete fails to find an object that matches the criteria completely, it will attempt to find a similar object:

  1. It will check all the objects on the same level of the hierarchy where the missing object resides. In web applications, it will also check all the objects down the hierarchy levels.

  2. 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.

  1. 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 a similar object is found, TestComplete will simulate the user actions over it and continue running the test. It will post this warning message suggesting that you update the tested object’s recognition criteria to match the found object:

'Node was changed' warning message in the test log

Click the image to enlarge it.

If TestComplete fails to find any suitable object, it will report the “The object does not exist” error.

Exploring the found object

In the Details panel of the message, you can view the table with the expected recognition criteria of the original object, actual properties of the replacement object, and suggested changes:

Suggested fixes for the recognition criteria

Click the image to enlarge it.

In the Picture panel, you can view the image of the found replacement object.

Resolving the warning message

Important: TestComplete will use the found replacement object only during the current test run. After the test run is over, TestComplete will revert all the changes made to the recognition criteria. When you re-run the test, TestComplete will again use the initial recognition criteria.

To resolve the warning message, update the object recognition criteria to use the replacement object during all subsequent test runs. To do this, click Accept Intelligent Fix:

Appliying fixes to recognition criteria

Click the image to enlarge it.

Confirm the changes if needed. TestComplete will apply the suggested changes to the tested object’s recognition criteria stored in the Name Mapping repository.

See Also

Handling the 'Object Does Not Exist' Error
Other "Object Not Found" Errors
Name Mapping

Highlight search results