how to best handle objects that get mapped with names that vary from one run of the AUT to another
This is a case that i just opened with SmartBear support but i'm also pasting in the forum to see if i get a quicker solution
The desktop application, for which we are developing automation, can have multiple subtabs for a given window tab
each one of the subtabs has its own menu panel on the left side of the screen. this menu panel is divided into sections (Details, Tasks, etc) and there are clickable links under each section. When recording the links being clicked in TestComplete, each new subtab is getting mapped into the NameMapping repository and the index associated with it is used in the name mapping process. In the Object Browser
you can see the instances of these subtabs each having a different indexed value (2, 3, 4). the one that is currently visible on the screen is highlighted while the other two are dimmed. The issue is that during the recording a particular subtab with all its child objects are getting mapped using the current index value but later, during playback, it might have a totally different index and the object cannot be found.
What is the simplest, easiest and recommended way to deal with this type of situation? Is it possible to use wildcards for the index? Thanks
Yes, you can use wildcards for the index but I would try and find another field to use in the mapping that's stable and unique. We avoid using index in the map for this very reason. The time it takes to edit the mapping to use another field is minimal and will be worth it in the long run.