Forum Discussion
ghuff2 thanks for the info.
It works, you suggested it.
However, it would be even better if the command line parameters could be variable, so that I can run Powershell as a TestedApp, with parameters to be used as Command line parameters.
Example:
I have multiple Powershell scripts which need to be run. Now I need to define a TestedApp for each Powershell script to be run. It would be easier if I can only define 1 Powershell as TestedApp and when calling it in my test I use the script to be run as a parameter.
Don't know if this is already implemented in TestComplete?
You can set the command line args through TestComplete scripting, see this article. So you'd just have powershell.exe be saved as the TestedApp and then set the command line arg for a specific script before running the TestedApp.
- djadhav10 years agoRegular Contributor
One way to do it using the shell: http://thedigitalhorizon.blogspot.com/2016/04/executing-powershell-commands-through.html