Forum Discussion
3 Replies
Sort By
Hi Michael,
You can pass a path to an executable file via the command line and use it to start your tested application in the test. Please refer to this How To article describing how to work with command-line parameters.- Michael_St_PeteContributorI am not trying to pass parameters to the .exe, I am trying to talk to an .exe that is in a different location. The computer where the .exe is located is c:\dir\subdir\loc and the the computer where Test Execute is trying to run has the .exe located in c:\other\subdir\loc. How can I still use my location on the Test Complete computer and still have it run on the Test Execute computer?
Hi Michael,
The parameter will contain the path to a folder where the executable file of your tested application is stored. For example, you will run TestExecute by using the following command line:
"C:\Program Files\Automated QA\TestExecute 7\Bin\TestExecute.exe" "c:\My Projects\MyProjSuite\MyProjSuite.pjs" /r "AppPath=C:\My Application\"
At the beginning of your test, you need to get the value of the AppPath parameter (based on the "Pass parameters via the command line" article) and use it to start your tested application:
function Test()
{
var appPathValue = // ... obtain the value of the AppPath parameter
TestedApps.Orders.Path = appPathValue;
TestedApps.Orders.Run();
}
Related Content
Recent Discussions
- 4 hours agoSubhraDas
- 23 hours agotramuntana