Forum Discussion

Ryu's avatar
Ryu
Contributor
6 years ago
Solved

Using the Find method when several screen objects have same namemapping

I am testing a web page that has several elements mapped to the same name (all of the checkboxes have different contentText values but are all mapped to page.checkboxObject and all of the buttons on ...
  • tristaanogre's avatar
    6 years ago

    It sounds like the problem is in your mapping, that the components are not being mapped uniquely enough.

    Couple of things:

     

    1) Go to Tools | Options | Engines | NameMapping and turn off the "Use extended find whenever possible" check flag.  Extended find is a good feature but, especially when recording tests, it can cause issues by collapsing the tree of ancestor objects TOO much

    2) Go to your NameMapping node and find the checkbox object in question.  If the "Extended Find" flag is turned on, you will need to remap the object after performing step 1 to give a better identification.

     

    Basically, TestComplete's NameMapping uses two main pieces of data to identify an object: 1) the ancestor/parent of the object and 2) the property/value pairs for the object.  So, what it sounds like is that some of the ancestor objects between the main form and the checkboxes have been "collapsed" from the Extended Find so, when searching for the checkbox, each one is found by the same NameMapping criteria.