Forum Discussion

laxtc's avatar
laxtc
Occasional Contributor
15 years ago

Namemapping

Hello,



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.



Thanks

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    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.
  • Hi Laxmikant,


    I'd like to note that the Name Mapping feature allows:

    - changing objects recognition criteria without changing your tests;

    - changing the recognition criteria dynamically from your script;

    - finding an object regardless of its position in the hierarchy;

    - updating your Name Mapping scheme dynamically during the test run.


    You can find more information on the feature in the Name Mapping and Managing Mapped Objects help topics.