Forum Discussion

cklein_1's avatar
cklein_1
Occasional Contributor
14 years ago

Losing my NameMapping

I've created a Project Suite that test a Windows application and have executed it many times. Now all of a sudden it cannot find the object. In my project I can see where the entire application is mapped under NameMapping. When I go into the Object Browser and pull up the application I notice that all of the mapping is gone. I'm still testing the same version of the application. I do not want to have to mapp the entire application again! It takes a while and it's a pain to map every object. Also, when I attempted to map it again it puts a _1 after the app in the naming mapping. Obviously Test Complete is aware that there is also another NameMapping for that app.



What am I doing wrong?



Thanks,

Chris

7 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Check the properties that are being used for mapping your application.  It is possible that something about those properties is now different and so TestComplete sees it differently.  That's the primary cause for behavior like you've mentioned.  
  • cklein_1's avatar
    cklein_1
    Occasional Contributor
    It looks to be all there to me. I dont see anything different. I'm looking at the properties Tab under NameMapping.



    Is there a way to map the entire application all at once? Instead of having to map each individual object one at a time.



    Thanks!
  • Hi,



    Is there a way to map the entire application all at once?


    You can map the entire tree structure of a process from a script (see here). However, I wouldn't recommend doing this. TC maps all objects you address on recording, and it is better to have only the needed objects in Name Mapping rather than to overweight it with the ones your test doesn't use.
  • cklein_1's avatar
    cklein_1
    Occasional Contributor
    Well, we develop scripts for all of our test. We don't start by recording. So when we execute the test our test bombs because we don't have something mapped. Do we have to start by recording before we start scripting?
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Do you have a screenshot showing the properties of your application in the NameMapping tree?



    Currently, my guess, is that all that's there is the Process property without anything else associated.  You mentioned that even that is getting remapped with an _1 attached.  Is it possible that, in your environment, there are occasionally two copies of that process running?  What does Task Manager show in regards to how many instances of your application are running?
  • cklein_1's avatar
    cklein_1
    Occasional Contributor
    I don't have two instances running. If I right click on my application under NameMapping and select show in Object Browser, and with my application open, I get a message saying "Cannot highlight this object in the object tree." 



    When I go to the Object Browser my MappedName reads; Aliases.App_1. It should be Aliases.App.  If I open a new Project Suite, with the same app open, I'll get Aliases.App.
  • cklein_1's avatar
    cklein_1
    Occasional Contributor
    You were right. For whatever reason my ProcessName for my App was changed to DCPSysMgr in the NameMapping. I changed it to what it should be and it worked. I have no idea how it got changed? I've never went into NameMapping until now.



    Thanks!



    Chris