Forum Discussion

maxjaison's avatar
maxjaison
New Contributor
6 years ago

Mappedname is being reused by another control

Hello,

 

I'm a newbie to the TestComplete tool.  I'm evaluating it for some automated testing.

I was recording the clicking of this link named "Documents".  You can see it being highlighted in recording mode.

In the keyword test item, I open the On-screen action and I see that the object mapped name is NameMapping.Sys.browser.pageUnderiterPortal.linkSubmission.

But when I clicked on "Highlight" button it shows me another control on the tested screen, where the name William is highlighted.

Is there a way I can update the mappedname of the object that I want to click i.e. "Documents"?

  • What it sounds like is that the properties of being used to map the component are not distinct enough to differentiate between the different links.  You'll need to first of all go back to where that "Submission" link is and edit the mapping of that component so that it is distinct.   Things like caption, text, label, etc., can help.   Then, when you get to the next page, you can remap the new component without issue.

     

    Just as a note -> This is a standard "problem" with recording tests.  You have very little control over how the components are mapped.  99.99999999% of the time, after you record a test, you should go back and edit, adjust, insert, etc., mapping and code logic to make sure that the test is robust and will work repeatedly.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What it sounds like is that the properties of being used to map the component are not distinct enough to differentiate between the different links.  You'll need to first of all go back to where that "Submission" link is and edit the mapping of that component so that it is distinct.   Things like caption, text, label, etc., can help.   Then, when you get to the next page, you can remap the new component without issue.

     

    Just as a note -> This is a standard "problem" with recording tests.  You have very little control over how the components are mapped.  99.99999999% of the time, after you record a test, you should go back and edit, adjust, insert, etc., mapping and code logic to make sure that the test is robust and will work repeatedly.

    • maxjaison's avatar
      maxjaison
      New Contributor

      Thank you, I was able to get it working with your suggestion.  I've used UiPath as an RPA tool and I was hoping TestComplete had similar object recognition functionality.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        TestComplete has a VERY robust object recognition technology in the Object Browser and in NameMapping.  However, it takes fine-tuning at times. A strict "record" doesn't always work well because, as you discovered, many components have very similar properties.  You need to be deliberate at times to make sure that objects are properly identified.