Forum Discussion

DarylMM's avatar
DarylMM
Occasional Contributor
7 years ago
Solved

Name Mapping giving multiple page elements the same name

I have a situation where I have covered a number of pages within one website. Now the Name Mapping seems to be giving the same name to multiple elements on the page. When I map to say button 2, it is giving the path to button 1. So when I initially create a click action on button 2 it defaults to button 1 when I run the test.

 

In the example below I am linking to a textbox which contains the text SanityTestJob Email - 31-12-2012. When I reopen this command it is now linking to a completely different element on the page using the same Alias.

 

Any help would be appreciated on why this would be happening / how to address it.

 

Thanks

 

  • To be able to help, it would be best to actually see the mapping criteria you are using for those components.  

     

    Generally, the behavior you are describing usually indicates that your mapping criteria is not unique enough.... that multiple items on screen satisfy the criteria and so TestComplete is grabbing the first one it finds.  If you were to actually run the test, you might get something like "Ambiguous object recognition".

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    To be able to help, it would be best to actually see the mapping criteria you are using for those components.  

     

    Generally, the behavior you are describing usually indicates that your mapping criteria is not unique enough.... that multiple items on screen satisfy the criteria and so TestComplete is grabbing the first one it finds.  If you were to actually run the test, you might get something like "Ambiguous object recognition".