Forum Discussion

yingkai1208's avatar
yingkai1208
Contributor
11 years ago
Solved

Remap dialog object in which most of controls stay same

Hi,  I mapped a dialog, but due to new feature introduced, developer changed the dialog name, and all old mapped names in the dialog disappeared.  Since most of controls in the dialog st...
  • tristaanogre's avatar
    11 years ago
    The article describes how to edit an object that has been mapped.  Essentially, you mapped an object and one of the properties you used (apparently) to uniquely identify the object within test complete is the caption.  When the caption changed, TestComplete can no longer find the object.  The solution is to go to NameMapping, find the object in NameMapping, edit it, and change the caption.  Take a look at the screenshot attached for the simple example from using the notepad application.  



    1. I found the notepad dialog in NameMapping and selected it


    2. In the right hand side, I clicked on the button beside the WndCaption property to open the edit dialog


    3. In the edit dialog, I can now change the caption to be something different.


    You have several options at the point in how you want to edit the caption.  You could make it a constant, essentially being the new value after the code changes.  Or, you could define a variable on the project level that you could assign the caption to in order to make your NameMapping more fluid.



    Other options are to find other mapping identifieers on your dialog other than the caption that are not going to change as frequently.  This would reduce the fequency of how often you would have to go through this edit process.



    Hope this helps.