Forum Discussion
In our application it will add multitude of Namemapping for a single object at each recording. And it can get out of hand. And if I don't take control of Namemapping, the whole thing is unreadable and very hard to understand which objects are no longer working. I don't want generic stuff like Grids, ContentContainer, Borders, ContentPresenter, etc. in namemapping. If an alias doesn't work then I have to run through all those muck in namemapping.
For example, a full name (property) of a specific object in our wpf application will go up to 2933 chars in length with a treelevel of 43.
Sidenote: Ah.. good they put the treelevel back. Perhaps I can use this in stead of parent to solve my problem.
The adding of multiple objects each time it records is not a problem with TestComplete... it's actually not a "problem". What it means is that the properties being used by TestComplete in the automatic recording are insufficient for unique identification. Alternatively, there could be a dynamic part of the properties being used that changes each time the test runs.
While automatic NameMapping is a good feature of TestComplete, it needs to be tempered with judicious editing and correcting of the mapping. This is a best practice frequently discussed here on the forums.
And, as mentione, that 2933 character lenght full name is something that you DON'T have to reference in your automation. You map the object with the full tree... but then edit the Alias to "contract" the tree to only those parts you actually need in your tests. Please reference the link in my previous post.
NameMapping is a very good tool, when used well. Some of the things you're trying to do with treelevel and parent are already handled by the NameMapping feature.