Inconsistent Mapping
I'm trying to map the various tabs within a website, and even though the objects are named consistently, for some reason name mapping isn't.
Mapping the first button, test complete recognizes that the button is within the main form "portal", it created a mapped object called "portal", then the first button is mapped as a direct child of "portal". The format for that button mapping (create customer) is name.mapping.sys.browser.portal.formcreatecustomer. When I look at the fullname for that button, format is basically "url".panel.panel.panel.panel.panel.form("createcustomer"). I like that the mapping is not using the fullname, it's clean and hierarchical for this first button.
Next button, within same form "portal", instead of mapping it like the first button i.e. name.mapping.sys.browser.portal.formcreateuser, it maps it according to the fullname, so all of a sudden my name mapping contains "url".panel.panel.panel.panel.panel.form("createuser").
it ends up looking like this.
panel
panel
panel
panel
"link"
etc etc
not only is this confusing, but it's terrible organizationally, and .panel is used everywhere so I get overlaps in mapping (meaning multiple objects using the same mapping) I'm mapping manually and taking my time with this, but I'm not sure why there's any variance here when the objects properties are consistent.
thanks in advance!
Go to Tools | Options | Engines | NameMapping. There's an option there called "Use extended find when possible". Turn that off.
Extended Find is a VERY useful feature in NameMapping (see https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/managing/modifying/extended-search-criteria.html for details). However, when it's turned on by default, it can create confusion because TestComplete tries to "collapse" panels dependant upon what it "knows" at the time and what you are using. So, mapping one object, it may use extended find with one set of panels... mapping another object, it may decide that some of the panels are not necessary and use extended find differently. This creates the confusing hierarchy you described.
So... my recommendation is to turn the option off so that TestComplete does not automatically assign Extended Find... but please, certainly use it where it makes sense for you to use it. Manually turn it on (or off) as you map components to "collapse" the hierarchy tree.