Once upon a time there were three strangers: Object Browser, Mapped Objects, and Name Mapping (Aliases). Each one had their own panel in TestComplete land but none knew of the other. The Object Browser was the oldest and wisest because he saw everything on a screen. Despite his knowledge and vision he was “old school” and never learned to refactor/rename or speak abstractly (spin*). He was long winded and spoke gibberish:
Sys.Browser("firefox").Page("http://localhost/CMWebTest/Go/?p=/CMWebTest/cribbin/cribbingridproperties").Panel("primaryWrapper").Section("primaryContent").Frame("t_CMWebTest_cribbin_cribbingridproperties_content").Section("actionWrapper").Section("actionContent").Panel(0).Table("splCribBin").Cell(0, 0).Panel("splCribBin_0_CC").Table("gridView_CRIB").Cell(0, 0).Panel(1).Table("gridView_CRIB_DXMainTable").Cell(1, 1)
Using this approach was highly fragile and broke when the object hierarchy changed (and they always do).
TestComplete land had a social program which attempted to help (Map objects automatically) but was unfriendly and somewhat dangerous - especially if ‘Use extended find when possible’ was enabled.
![Automatic Mapping.JPG Automatic Mapping.JPG]()
The next oldest was Mapped Objects. He learned about objects while traveling down the Keyword Test highway and the ‘Map New Object’ button was used during object recognition while creating test steps. However, Name Mapping(s) are not generated and leaves a disconnect between Mapped Objects and Name Mapping (Aliases).
![Map New Object.JPG Map New Object.JPG]()
His approach wasn’t browser friendly (sys.browser v. Alias.Browser)
![sys.browser.jpg sys.browser.jpg]()
and left a gap between Mapped Objects and Aliases. He was somewhat convincing but had only his own self interest at heart. There was a social gathering in town where he would show town folk this ‘Map New Object’ button but didn’t tell them of it’s shortcomings.
He could map objects but many assumed this included Name Mapping and many were fooled. He later shared there was more which needed to be done to be useful (Manual Name Mapping). Had the townsfolk realized how tedious and pearlous this journey was they would have never listened to him had they known.
![Manual Mapping.JPG Manual Mapping.JPG]()
The youngest, fastest, and smartest was Name Mapping. He could refactor/rename at the speed of light and provided the most use of anyone in town. And he was browser friendly (Alias.Browser) and a little bit wild (*). His wildness provided great benefit and flexibility never before seen. The problem was there was only one place they could meet and the townsfolk were not told.
And then one day at a town gathering the Object Browser spoke out and said, “I may be the oldest but don’t forget I am also the wisest.” And then he proceeded to share his magic. He said, “If you map from me I’ll give you both Object Mapping and Name Mapping (unlike those younger whipper snappers). He said, “It is easy - let me show you how.”
"Before using the object in a test, map it using me", said the Object Browser ...
First, use the ‘Object Spy’ button to identify the object.
![Spy.JPG Spy.JPG]()
Then use the “Highlight Object in Object Tree” to easily and quickly find the object in the Object Browser.
![sys.browser.jpg sys.browser.jpg]()
And map from there by right-click on the desired object.
![Object Browser.JPG Object Browser.JPG]()
Object Browser said,“You will get both Object Mapping andName Mapping speaking to each other and the entire town will be in harmony” and the townspeople were in awe and elected him mayor.