The controls are automatically getting unmapped
Hi,
I have recorded a testscript for a page which contains many panels, textboxes and dropdowns.
But when I run it for multiple times i'm getting errors like panel doesn't exist, textbox doesn't exist. The controls automatically getting unmapped.
//Aliases.browser.pageClientSecurityProject.panel2.textbox.SetText(DDT.CurrentDriver.Value("Client"));
I'm getting error - "The textbox doesn't exist'
Please help me on this.
Update NameMapping during the test run is one way... however, what it sounds like is you have controls and object that are not getting UNMapped but there are possibly two problems going on.
1) Timing issues - TestComplete, by default, attempts to execute actions at full speed. That means that it will attempt to perform an action potentially BEFORE the object is actually available to receive the action. You can increase your Auto-Wait timeout in your settings, you can add code to detect existance before you proceed. You can make sure you have "Wait" methods appropriately for pages, etc. It's all about making sure you write your automation to do what a human will do, namely, wait for the control to be ready for interaction.
https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html
2) Dynamic properties - You're using a web application for your testing.... which means that there is a likelihood that the properties that were used to map the objects when they were automatically mapped by TestComplete are dynamic, meaning they change every time the application runs. It is for this reason that I and a lot of other users here recommend that, after you record a test, you go back and edit your mapped objects to adjust such properties by adding wild-cards, conditional mapping, or even select different properties for mapping rather than what is included by default.