Forum Discussion

jloyzagawh's avatar
jloyzagawh
Contributor
9 years ago
Solved

Change the application run folder

There are times that I want to run the application run folder for a specific application in the TestedApps list depending on the version/directory where it is stored - can I do this programmatically? this all would come from a config file read in at the start....

  • you can select which aplication in run-time to run from TestedApps

    can do like........

    var App;

    if (X==Y) App =one.exe;

    if (X==Z) App =two.exe;

    ..

    ...

    ..

    appObj = 'TestedApps.'+App;
    eval(appObj).Run();

     

2 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor

    you can select which aplication in run-time to run from TestedApps

    can do like........

    var App;

    if (X==Y) App =one.exe;

    if (X==Z) App =two.exe;

    ..

    ...

    ..

    appObj = 'TestedApps.'+App;
    eval(appObj).Run();

     

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    You can also change a tested app's path programmatically:

     

    // JScript
    var appParams = TestedApps.MyApp.Params.SimpleParams; appParams.FilePath = "C:\\Windows"; appParams.FileName = "notepad.exe";
    TestedApp.MyApp.Run();