Forum Discussion

nedbacan's avatar
nedbacan
Frequent Contributor
5 years ago
Solved

Object name keeps changing when web app is relaunched

 

Hello.  I am fairly new to TestComplete and having problems in getting my script to run everytime.

 

It complaints about not finding the object, and the reason was that the object name changed.

 

For example, when I recorded my script using the keyword method, the object names are captured, for instance this "Aliases.browser.pageImagenet.buttonNewPatient"  get records for a create button but when I relaunch the web app and run the script again the object gets changed to  "Aliases.browser.pageImagenet2.buttonNewPatient", it added a 2 (see attachment).  When I remove the "2" the button is found again.  Again, I am new on this but I read something about adding a wildcard/expression in the object.  What is the best approach, I am sure I will have lots of this same problem in the web app and I would like to start understanding it.  I heard of Mapping Objects, but I am not familiar with it either. What are my best options to make automation testing easier.  

 

Also, I want to use this same script on other Windows computers so i want to keep this in mind, when finding the right solution to this dynamic change. 

 

I learn best my examples so if you can show me how the object should be written and any other tips to avoid no object is found errors from happening.

 

Thank you very much for your help.

 

 

 

 

4 Replies