How to exit from an event which lasted too long while running the scripts in TestComplete?
I clicked the stop button, but it did not stop, still running. I have no way to stop it from running. The process is "Waiting until the delay between events expires."
If you hit Stop button in-order to stop the playback, It will exit only after the completion of current active event/action/delay complete.
For Ex:
In the below function, if you stop during the delay. It will stop only after the Delay completes. But this is not the cause with WaitProperty things like that
function testStop() { Log.Message(Test Stop Start); aqUtils.Delay(10000); Log.Message(Test Stop End); }
Ref: https://support.smartbear.com/testcomplete/docs/testing-with/running/overview.html#Stop
Thanks for the reply.
Now I understand that it took so long due to an object locating event which lasted over 20 minutes to go out from it but still failed to locate the object.
Maybe I should ask another question: how to stop a current active event/action/delay?
Thank you.
shankar_r wrote:If you hit Stop button in-order to stop the playback, It will exit only after the completion of current active event/action/delay complete.
For Ex:
In the below function, if you stop during the delay. It will stop only after the Delay completes. But this is not the cause with WaitProperty things like that
function testStop() { Log.Message(Test Stop Start); aqUtils.Delay(10000); Log.Message(Test Stop End); }
Ref: https://support.smartbear.com/testcomplete/docs/testing-with/running/overview.html#Stop
It will also be trying to write the log before it stops. If this is a long test, it may need an extended time to finish that.
Maybe I should ask another question: how to stop a current active event/action/delay?
Do you mean is there a quicker way to do what you just did? Not really. Are you looking for ways to keep a search from running for a long time if the object is not there? That's what shankar_r was mentioning about the Wait* functions. You can wait for an object or an object property and give it a time limit.
This link may be helpful: