After doing some research on Name mapping, I think this requires high maintenance, as things change you keep updating the Name Mapping. Is that right?. I think it is better to write the scipt and find the object that we want using NativeWebObject method then perform actions.
Please let me know if I am doing the right conclusion.
Actually, not entirely true. NameMapping allows you to alias objects and such within your AUT based upon a set of properties and associated values. This allows you to use the asterisk (*) to wildcard certain property values and to use other properties than just the component name for the mapping (such as index, caption, etc).
For our Web application, this has become invaluable because, as DIV's and other such change on the application and hierarchies and the like change, name mapping allows us to be able to use a consistent alias for every component. Additionally, there's a feature called "Extended Find" that allows you to map an object but then, if it moves into a deeper child object or similar thing, the name mapping engine can still find it.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.