Forum Discussion

Niran's avatar
Niran
Contributor
12 years ago

Namemapping, Mapped objects and Aliases

Could anyone please explain, what is the difference between Mapped Objects and Aliases in NameMapping?



Thanks,

Niranjan R.
  • When you map an object, you get the NameMapping entry and an automatically created Alias:

    Mapped Name: NameMapping.Sys.notepad.wndNotepad

    Alias: Aliases.notepad.wndNotepad



    For most cases, the full Mapped Name will mirror the structure of your application under test. That makes tests written with the Mapped Name instead of the Alias a little more brittle as a change in the application's structure requires changing everywhere that you reference the object in your scripts.



    However, you can create a shorter Alias to just the things that matter to your tests, like Aliases.wndNotepad, and then not only do you have more sensible names build into your tests, you can just update what mapped object the Alias represents in the NameMapping instead of updating your scripts.