Sharing NameMapping from one project to another in the same project suite won't work
I have a project suite and have a few projects inside, in the first project I have a NameMapping that is working fine, I've shared this NameMapping to another project, and what a wonder it won't recognize the objects the original NameMapping does. it does recognizes the very high application level in the name mapping but won't recognize any objects which are down the hierarchy. by the way, when sharing scripts or feature files I don't see any issues,
I also tried adding a new NameMapping to the other project and then merging it with the original one, but that didn't work the same outcome.
Any idea why?
When I worked on the NameMapping I changed a few things in the Mapped Objects section (moved objects position etc.) and now when sharing the NameMapping file it looks like it changed a few of the values and therefore cannot trace the tree hierarchy.
How are you 'sharing' you NameMapping files? Are you just copying the file and pasting it in another project folder OR are you using a remote repository to push and pull your code into another project? The correct way to add into another project would be to right-click the project and choose Add>Existing Item
The NameMapping file contains a unique root signature for your project along with some other unique mapped keys/ids. Start by reviewing the merge recommendation referenced [here]
Hi 8kit and thanks for the reply.
I did use right-click the project and choose Add>Existing Item but didn't work as expected.
I wonder if that could happen for a different reason I edited my NameMapping file. I did change (drag and drop) things not only in the Aliases bit but also in the System bit. I wouldn't expect that not to happen as it allowed.
I would start by opening both projects with the 'shared' name mapping and see how TestComplete is recognizing the same object in each project. The merge reference link I posted earlier has a good example on conflict resolution. You can also try using conditional mapping to add logical identifiers [see here]. Ideally you want to only change 1 master NameMapping file and merge into your other projects. See another thread [here]
As well as merging, I also copy and paste mapped objects into their respective hierarchy. If the hierarchy is broken, then TestComplete will not be able to recognise the UI Object. See Understanding Web Object Identification and Object Models