Forum Discussion

hao_bai's avatar
hao_bai
Occasional Contributor
14 years ago

How can I RebootAndContinue several times ?

I use following
script at XP-pro SP3,TC7.52:

Unit1.sj



function Restart(API) {

    Log.Message("Try to RebootAndContinue API: " + API );

    KillProcess("Explorer");    

    KillProcess("explorer") ;

    KillProcess("notepad");

    KillProcess("Uedit32");

    KillProcess("firefox");

    KillProcess("EXCEL");

    aqEnvironment.RebootAndContinue(API);

}



function test1() {

    Log.Message("====1111====test1...");

    Restart("Unit1.test2");    

}



function test2() {

    Log.Message("=====2222222=====test2...");

    Restart("Unit1.test3");        

}



function test3() {

    Log.Message("=====3333333=====test3...");

}





But TC will not restart automatically every time, each time need I manually reopen TC and go to the Unit1.sj, then the computer will restart and continue.



And I got Error pic sometimes

1 Reply

  • Hi,


    We have already replied to the request that you submitted via our Contact Support form earlier. Here is our message:




    We commented out the code lines containing calls to the KillProcess function (we do not have a definition of the function), tried executing the script, and did not face any problems. So, we will need some additional information on the problem:


    1. Describe the problem in detail. Please let me know whether the only problem you are facing is the error displayed in the image you've sent.

    2. Is the computer restarted?

    3. We will need a project suite containing the script along with the definition of the KillProcess function. Reproduce the problem, pack the project suite folder, and send me the archive.


    Thanks in advance.


    Also, in the future, please do not send us duplicated requests (note that we reply to messages sent via the Contact Support form, AutomatedQA forums and the TestComplete section of the SQAforums site). This makes processing your requests much more difficult for us and does not increase the requests' priority anyway.