As far as I understand, you have enabled the Automatically update name mapping items option of the Tools | Options | Engines | Name Mapping page. With the option enabled, when TestComplete cannot identify a mapping object, it displays the Update Name Mapping wizard to help you resolve the object identification problem.
"The parent object hierarchy of the selected object does not match the expected hierarchy" error means that the selected object does not have the same parent object in your tested application as the not-found mapped object does. TestComplete does not resolve such situations automatically, so the wizard suggests that you update the hierarchy of mapping objects manually.
However, I guess in your case the problem is not related to changes in the application object hierarchy. From your message, I see that some objects of the tested application are recognized using names such as wndWindowsForms10Window8app021093c04. It means that the application is a .NET Windows Forms application that for some reason is not recognized as an Open Application.
So, the first thing you need to do is to make sure that the tested application is recognized as a Windows Forms Open Application. For this purpose, please make sure that the .NET Open Application Support plug-in is installed and enabled in TestComplete (File | Install Extension...). If this suggestion does not help you solve the problem, we need some additional information to investigate the issue. Please answer the following questions:
1. A possible cause of the problem is that some complex actions which take long to be completed are performed in the application's GUI threads when the application is started (the application's main window may become blank or unresponsive in such cases). If so, try increasing the Method invoke timeout option described in the Project Properties - General Open Applications Options help topic, check whether the problem persists and let us know your results. Does this help?
2. Is your tested application compiled for an x86 platform or for a x64 platform?
3. Exactly how is the application launched? Is it launched as an item of the Tested Applications collection? Is it launched under another account (in RunAs mode)? Is it launched before or after TestComplete is launched? Please send us a detailed description of the steps you perform to launch the application.
4. Is the application launched from a network folder or from a folder having specific Runtime Security Policy settings? If it is, please make sure that the Runtime Security Policy settings for the folder from which the application is started are set as it is described in the Working With Network and No-Touch-.NET-Deployment Applications help topic.
I have ran into the same problem. However, it only happened to one of the objects despite the fact that the application has been recognized as open. I have not realized that until it was too late and now I have many tests with wrong mapping. How do I fix this? How can I mass change the object mapping? When I try to select the correct object in Update Name Mapping dialog, I get error that says "object does not meet specified mapping criteria"
The Name Mapping editor contains two trees: Mapped Objects and Aliases. The Mapped Objects tree displays the object hierarchy as it exists in the system. The Aliases tree displays the object hierarchy as it is used in tests. You can try to change the Mapped Object tree, but keep the Aliases tree unchanged:
* Open your tested application and make sure the that "problematic" object is visible on the screen.
* The new mapped object will be added to the Mapped Objects and Aliases trees of the Name Mapping editor.
* In thee Aliases tree, delete the alias of the problematic object. Then, put the newly added alias to the position, where the problematic alias was. To change the alias position within the tree, simply drag it to the needed place.
You can also drag items from the Mapped Objects tree to the Aliases tree. After you add items this way, you can change their location within the Aliases tree by dragging them to the needed position.
* Open the Name Mapping editor and expand the Mapped Objects section in it.
* Right-click somewhere within the column header area and select Field Chooser from the context menu. A list with column names will pop up.
* Drag the Extended Find column from the list to the column header area of the Mapped Objects section.
* Find the problematic object in the Mapped Objects tree and then select the Extended Find check box for the object.
* Save the changes.
As I have said above, the Mapped Object tree represents the object hierarchy as it exists in the system. When the Extended Find attribute is disabled, TestComplete only searches at that level at which the object resides in the tree. When you enable the attribute, you command TestComplete to search for an object among other children of the same parent at any level. This will increase the time needed to find the needed object, but should keep your tests functioning.
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
This thread is almost 8 years old now. Please post your question as a new question. Versions have changed, tech has changed. It might be a completely unrelated problem.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.