NameMapping MappedObjects and aliases trees
Hello!
NameMapping has 2 trees - Mapped objects and Aliases. My understanding is, the former is the "original" tree, while the latter is a "copy" because, changes made to the former (for example, deleting an object) affects the latter, but not vice versa. My question is, if objects are named differently in the Aliases tree, then the objects in this tree do not anymore have the name assigned by the developers. In this case, how is TestComplete able to identify the right object with the Aliases name on tests? How are the objects on Aliases tree and Mapped objects tree referenced to each other?
Thanks in advance
Aliases are just that... aliases. They are a naming and hierarchal structure wrapped around the actual mapping that are used within your test cases. You can have an object mapped as
NameMapping.Sys.MyApp.Form1.Panel2.Table1.Cell2.textbox1
and it can have an Alias of
Aliases.MyApp.MainForm.textboxEditField
They can be the same thing.
The way it works, in simple terms, is that your test case reads the Alias and uses the associated mapping to do the identification. The Alias name, even the mapped name, don't have to match what the developers gave it. The hierachy of parent/child does need to be maintained but can be "collapsed" in the Aliases. But what does the identification is not the name in the NameMapping or Aliases tree but a combination of the parent/child relationship and the identifying properties (class name, caption, etc).