Forum Discussion

vlall's avatar
vlall
New Contributor
7 years ago

Recorded script clicks wrong link

Test Complete 12.42

 

I am recording a .net desktop application. i launch the application from desktop and then click on a customer entry link. a new customer enter window opens up and then i close the application and stop the script.

 

when i try to rerun the script, the scripts click on the wrong link, it clicks on the link below customer enter and my script fails.

 

Please advise.

 

Please find the screen shot attached for better understanding.

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    This sounds like an object identification issue in your NameMapping where the mapping for the link is not specific enough to distinguish which link to click.

    At the risk of sounding like a broken record....

    ...it is a best practice that, after recording automation, that the automation developer goes back and examines the resulting mapped objects and make any necessary edits to ensure a unique identification.  My guess is that there's an Extended Find being used to find the first link within the specified parent object... and "finds" like that usually work bottom up....  So... go take a look at your mapping and do the necessary edits to uniquely identify the link you want.  You might want to look at the text property, content text, caption, etc., as possible properties to add.

    • vlall's avatar
      vlall
      New Contributor

      Thanks for the reply. I have not done any changes, however recorded the script and rerun it and it worked fine.