Forum Discussion

Valença's avatar
Valença
Occasional Contributor
5 years ago
Solved

RunRoutine multiple scripts with one log

Hello, 

 

I am trying to execute multiple scripts via COM ( javascript ). My problem is: for each RunRoutine that i execute, i got 1 log for testComplete.

 

 

Javascript Code:

 

var projectSuite = "C:\\Testes\\Controle de Transportadoras\\ControleTransportadora.pjs";

var project = "ControleTransportadora";
var unitName = "Multas";
var progID = "TestComplete.TestCompleteX64Application";

try {
  var te = GetObject("", progID);
}
catch(e) {
  te = new ActiveXObject(progID);
}

var integration = te.Integration;

integration.RunRoutine(project,unitName, "clickButton9");
while (integration.IsRunning())
    WScript.sleep(100);

integration.RunRoutine(project, unitName, "clickButton5");  
while (integration.IsRunning())
    WScript.sleep(100);

TestComplete Code:

function clickButton9(){
    Sys.Process("calc").Window("CalcFrame", "Calculadora", 1).Window("CalcFrame", "", 1).Window("#32770", "", 2).Window("Button", "9", 14).Click();
}


function clickButton5(){
    Sys.Process("calc").Window("CalcFrame", "Calculadora", 1).Window("CalcFrame", "", 1).Window("#32770", "", 2).Window("Button", "5", 10).Click(); 
}

Is there a way to get ONE log for all Routines?

Running all routines together the execution time will be more faster.

 

 

4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    rather than running one routine at a time, you can link each routine into a test item in TestComplete and then run the whole project.

    • Valença's avatar
      Valença
      Occasional Contributor

      I dont wanna group the routines in TestComplete, its dont resolve my problem.

      I need to run multiple routines by javascript via COM, all in sequence and get ONE log for all this sequence.