Forum Discussion
tristaanogre
15 years agoEsteemed Contributor
You will need to write code using the Builtin.ParamStr and BuiltIn.ParamCount methods.
I quote from the first article:
Also, from that same first article, there's a code example:
The code example is rather trivial but it shows how to retrieve the command line parameters and access them using those two methods mentioned above.
I quote from the first article:
You can determine what parameters were passed to TestComplete in its command line by using the ParamStrfunction. It allows you to get a TestComplete command-line argument specified by its index. To get the total number of arguments in the command line, use theParamCount
Also, from that same first article, there's a code example:
function CommandLineArgs()
{
var nArgs = BuiltIn.ParamCount();
Log.Message("Total number of command-line arguments: " + nArgs);
Log.Message("The fully-qualified name of the TestComplete executable: " + BuiltIn.ParamStr(0));
for (var i = 1; i <= nArgs ; i++)
Log.Message("Arg " + i + ": " + BuiltIn.ParamStr(i));
}
The code example is rather trivial but it shows how to retrieve the command line parameters and access them using those two methods mentioned above.