I use a script to install and add a new build of the program.
I use
TestedApps.Add
to add the path to the launcher. I was wondering if there's any way to add a command line parameter too? I want it to launch with the:
-shortcuts
command, such as it would launch as:
"C:\Program Files (x86)\Sample Folder\ Sample Launcher.exe" -shortcuts
But when I try to use
TestedApps.Launcher.Params.ActiveParams.CommandLineParameters = "-qashortcuts"
It launches as
"C:\Program Files (x86)\Sample Folder\ Sample Launcher.exe -shortcuts"
and complete ignores the -shortcuts command
Any idea on how to do this? Preferably from adding it I would like the TestedApps to have -shortcuts defined as a command line parameter but that doesn't seem possible.
Solved! Go to Solution.
Here's the question:
Why use TestedApps at all? Rather than having to add a TestedApp and then remove it later in the test (or, remember to include it in some sort of cleanup), why not use the WshShell.Exec method to just execute your application at a command line?
https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html
Here's the question:
Why use TestedApps at all? Rather than having to add a TestedApp and then remove it later in the test (or, remember to include it in some sort of cleanup), why not use the WshShell.Exec method to just execute your application at a command line?
https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html
I guess I use a launcher for consistiencies sake of consistency.
I tend to launch it through TestedApps.Run() but I guess I could work around that. I'll look into the WshShell.Exec method - thanks!
There is no way to do this through TestedApps then?
Suffice it to say... rather than changing the commandline parameters after the fact, when you call the "Add" method, add the parameter to the proper parameter of the Add method.
Like so.
function AddingApp(){ var app = TestedApps.Add('Test.bat','-blah',1,true,'C:\\Temp\\');
TestedApps.Items(app).Run(); }
This places the commandline switch in the appropriate place in the TestedApps object and then all you need to do is run the app./
Subject | Author | Latest Post |
---|---|---|