Ask a Question

How to exit from an event which lasted too long while running the scripts in TestComplete?

SOLVED
Cathy928
New Contributor

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."

4 REPLIES 4
shankar_r
Community Hero

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
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

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:

https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/waiting-process-or-window-a...

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Thanks for the answer.

cancel
Showing results for 
Search instead for 
Did you mean: