cancel
Showing results for 
Search instead for 
Did you mean: 

The controls are automatically getting unmapped

SOLVED
Occasional Contributor

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.

  

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: The controls are automatically getting unmapped

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Community Leader

Re: The controls are automatically getting unmapped

Yo!

 

Try to enable this option in settings:

 

 

NameMapping.png

Occasional Contributor

Re: The controls are automatically getting unmapped

Thanks for the reponse.

I have enabled it already. when the test is running it is displaying a dialog box on the screen asking me to map it. Sometimes it won't even ask for the update of the namemapping, it'll directly show it as error.

But why it is getting unmapped when nothing is chaged for the page neither I have changed anything from testcomplete nor from the development.

Highlighted
Community Hero

Re: The controls are automatically getting unmapped

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.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post