Forum Discussion

Mario_Alberts's avatar
Mario_Alberts
New Contributor
13 years ago

Update Name Mapping

Hello,



I'm getting the following error:



 

The parent object hierarchy of the selected object does not match the expected hierarchy, Please re-map the object


manually to reflect the changes.





How do I re-map the object manually to reflect the changes?



Aliases.LivewireApplication.wndWindowsForms10Window8app021093c04.WindowsForms10Window8app021093c0.Item



I'm also seeing "item" and "item1" at the end of the string.  



Please advise.



Thanks,



Mario

5 Replies

  • Hello Mario,



    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.



    5. Is the application treated as Open according to the Process Filter options? Please see the Project Properties - Process Filter Options help topic for details.



    6. The problem can be caused by the fact that TestComplete is terminated incorrectly and the tested application is not restarted after that. Is this your case?



    7. Does your tested application use components that are not a part of the Windows Forms application framework by default (e.g. VCL.NET) or WPF components?



    8. Does your application's process have child objects named AppDomain(...) in the Object Browser panel when the application is not recognized as Open?



    If the application is still not recognized as Open, please collect detailed information on your system and send me the files. To get the information, please do the following:

    - Run the msinfo32 utility (Start | Run...).


    - Save the information it collects to an *.NFO file.


    - Send me the file via the Contact Support Form
  • carreras's avatar
    carreras
    New Contributor
    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"
      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        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.

  • AlexeyK's avatar
    AlexeyK
    SmartBear Alumni (Retired)

    Minerva,

    I'd suggest trying the following two approaches:


    1)

    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.

    * Click the Map Object From Screen item on TestComplete's toolbar and map the object using the subsequent dialog. See http://support.smartbear.com/viewarticle/27756.

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


    2) Another solution is to use the Extended Find feature:

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