Forum Discussion
Hi,
The approach mentioned by Tanya works.
It might help if you let us know the actual code that did not work for you.
> TestedApps.'testname'.Params.SimpleParams
Assuming that the TestedApp name for your application is 'testname' (without quotes), the code line must be
TestedApps.testname.Params.SimpleParams
I am not sure if it is possible to name the TestedApp as 'testname' (with quotes) as this produces the name that is invalid for the scripting language code and if you managed to name your tested app using quotes, this should be reported as an issue to Support via the http://support.smartbear.com/message/?prod=TestComplete form.
Yes that is precisely what I did. Sorry I didn't clarify that properly. That is the exact code I used.
- msaunders11 years agoContributor
This is my function to get my program to change the command line args per run of the software
function CommandLine(neededParams)
{
var commandLineParams = neededParams;
TestedApps.<appName>.Params.SimpleParams.CommandLineParameters = commandLineParams;
}At the end of each run i call this also
function ClearParams()
{
neededParams = "";
Log.Message("cleared parameters by setting to: " + neededParams);
CommandLine(neededParams);
}May not be the best way to do it but it works for my application
- TanyaYatskovska11 years ago
Alumni
Did you try using your tested app name without quotes?
- amcnamara11 years agoContributor
Yes. I never used quotes. I just put those there to show that I knew I needed to change "tested app" to the name of my actual tested app.