cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a command line parameter to a batch file

SOLVED
Highlighted
Contributor

Passing a command line parameter to a batch file

I have a tested app that is a batch file and I would like to pass a parameter to that batch file for it to use. How would I go about doing this? I am writing using Javascript. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Passing a command line parameter to a batch file

You can use the WshShell object within TestComplete to execute a command line to run your batch file, much the same way as you would do from the command prompt in windows.  You can then pass any parameters through in the same way.

 

https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
2 REPLIES 2
Community Hero

Re: Passing a command line parameter to a batch file

Community Hero

Re: Passing a command line parameter to a batch file

You can use the WshShell object within TestComplete to execute a command line to run your batch file, much the same way as you would do from the command prompt in windows.  You can then pass any parameters through in the same way.

 

https://support.smartbear.com/testcomplete/docs/reference/program-objects/wshshell/index.html


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
Join the September Hub-bub to show off, learn and win