Forum Discussion

scot1967's avatar
scot1967
Frequent Contributor
5 years ago

Using the BuiltIn.CreateVariantArray Method?

I am trying tom build a variant array in Javascript using TestComplete to build an array of menu objects.  This should do the trick... https://support.smartbear.com/testcomplete/docs/reference/progra...
  • rajulapati's avatar
    5 years ago

    Hi scot1967 ,

     

    If you are looking for a code here is the example

     

     TempArray["Test"] = BuiltIn.CreateVariantArray(0, 5);

      var i;

      for(i = BuiltIn.VarArrayLowBound(TempArray["Test"] , 1); i <= BuiltIn.VarArrayHighBound(TempArray["Test"] , 1); i++)
    {
         Log.Message(TempArray["Test"] (i) );
    }

     

    -Ashwin

    Please give a Kudo and accept it as a solution if this works