Process Operations
The folder TBox Automation Tools->Process Operations in the Standard subset contains the Module TBox Start Program.
This Module allows you to open an application or an executable file stored in a Microsoft Windows® file system.
It has the following ModuleAttributes:
Attribute |
Description |
---|---|
Path |
Path to the application that you want to open. You can also use environment variables. This entry is mandatory. |
Directory |
Specify a working directory for the program. By default, Tricentis Tosca uses the home directory of the registered user: C:\Documents and Settings\<user name>. |
Arguments |
If you want to start the application via arguments, specify arguments. By default, Tosca Commander uses ActionMode Select. |
Arguments->Argument |
Define an argument. You can specify several arguments, one per sub-ModuleAttribute. |
WaitforExit |
You can instruct Tricentis Tosca to wait until the application has been exited. To do so, set the value True and use ActionMode Select. Optionally, specify StandardOutputFile, TimeoutForExit, and ExitCode. |
WaitforExit->StandardOutputFile |
If you want Tricentis Tosca to create a log, specify the path and name of the log file. The log includes standard output (stdout) and standard error (stderr). |
WaitforExit->TimeoutForExit |
Specify the maximum time in seconds that Tricentis Tosca should wait before exiting the application. |
WaitforExit->ExitCode |
Verify your application's exit code. To do so, enter the code into the Value column and use ActionMode Verify. |
Run as |
Define which domain or local user credentials Tricentis Tosca should use to open the application. By default, Tosca Commander chooses ActionMode Select. |
Run as->Username |
User Principal Name (UPN) format of the user name that should open the application. For example: jdoe@company.com. |
Run as->Password |
If needed, specify the password of the user. |
Example 1
In this example, you start the application Notepad.exe, which is located at C:\Windows.
To do so, Tricentis Tosca uses the user credentials of John Doe as specified in Username and Password.
Example 2
In this example, you open the file Test01.xml, which is located at D:\, with the program notepad.exe, which is located at C:\Windows.
The defined working directory is C:\Temp.
Example 3
In this example, you start Microsoft Windows® Internet Explorer and open the website www.tricentis.com in private mode:
Example 4
In this example, you start TCShell.exe, which is located at %COMMANDER_HOME%.
Additionally, Tricentis Tosca performs the following actions:
-
Waits until the application has exited
-
Verifies the application's ExitCode: 0
-
Creates a log file named log.txt and saves it to %TEMP%