Forum Discussion

kakabubu's avatar
kakabubu
Contributor
6 years ago

Get "filePath" value set for -exportLogs parameter on tests start

We're running the tests with PowerShell command  $pinfo = New-Object System.Diagnostics.ProcessStartInfo $folderName = $env:logsPath $pinfo.FileName = "C:\Program Files (x86)\SmartBear\TestComplete...
  • kakabubu's avatar
    kakabubu
    6 years ago

    Thank you a lot!
    As a result, I got the function below:

    function getCommandLineArgs() {
    let args = { file_name: BuiltIn.ParamStr(1) };
    let argsList = [];
    for (let i = 2; i <= BuiltIn.ParamCount(); i++) argsList.push(BuiltIn.ParamStr(i));
    argsList.forEach(p => {
    const [key, value] = p.substring(1).split(/:(.+)/);
    args[key] = value == null ? true : value;
    });
    return args;
    }