Forum Discussion

Johann_G's avatar
Johann_G
Regular Visitor
7 years ago

Problem with similarly named forms, objecs

Hi All,

 

I'm new to Testcomplete and have run into my first big problem.

 

I've started writing automation for a 3rd party windows application but I've noticed that the application does not use unique names for forms or objects, the names don't seem to be generated at runtime, they are static, just not unique.

 

So to give a practical example: I want to automate Logging a CRM call and linking a Invoice to the call, to do this I need to open 4 forms, logically they all have a parent child relationship as I need to open Form 2 from form 1 etc. but they are all called the same within the code and hence are mapped to the same thing within test complete.

 

So it happens that I have 3 forms open, all called Form1 in the code, and all of them have a button called close. Now telling TC to click the Form1.closebtn causes it to give a error as I guess it can't uniquely identify the object  Any ideas on how to get around this? 

 

I've attached a screenshot of the mapped objects to give a better idea, all those buttons are actually on different forms but TC Maps them as if they are all on one. So when I open another form and try and map its close button TC tells me its already mapped.

 

1 Reply

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    Please investigate an Object Browser view at the moment when all Forms are opened. 

    Don't use automatic name mapping. Try to find differences in Form properties and map them manually.