Forum Discussion

ml's avatar
ml
Contributor
10 years ago

The window was destroyed during method execution.

 

A weird error appears when i start my network-suite-jobs. After opening the application on the remote machine, testcomplete/testexecute should press a button on the main menu, but then it stops the testing (from my sight without a reason). The strange thing is, that this is happening randomly - sometimes everything works fine, but from time to time this weird error comes up (only on two from ten tests):

 

"The window with the handle 0x0001042e does not exist. Most likely, this error occurred because the tested object (window or control) or its parent object was deleted or recreated during the method call or before it. For instance, the window could be destroyed or recreated after you stored the object reference to a variable and before you called the object method through this variable. If the object is recreated, then to avoid the error, check the object's Exists property before calling the method, and if the object does not exist, obtain a reference to the new object."

 

Tested object: Aliases.xxx.DesignPointDlg_Gas_Comp (Sys.Process('xxx').VCLObject('DesignPointDlg'))

 
  • Sounds like the object in question isn't always loading as fast as TestComplete wants to see it.  Try either putting a Delay right before the line that stops or use some version of Wait to give that window some time to show up.

  • Sounds like the object in question isn't always loading as fast as TestComplete wants to see it.  Try either putting a Delay right before the line that stops or use some version of Wait to give that window some time to show up.

  • I do not know if I understand but:


    I've had a similar problem. This happens because when the "program stops responding" to process an event that
    user first, the TestComplete can automatically close thus preventing the test continues.

    Perhaps disabling the following option: Tools> Current Project Properties> Playback: Check the checkbox Stop on window recognition error.

    Check other checkbox, I am absolutely sure that one of them will solve your problem. If TestComplete is automatically closing the tested application.