ZenoTest
ZenoTest — Windows desktop UI test automation for Qt, WPF, WinForms & native apps. Record, script, and run automated GUI tests with CI/CD integration.

Execute

void Execute(string command, string args, string workingDir, bool wait)

Description
Executes an external program or command with optional arguments and working directory.
The function allows running console applications, scripts, or any executable file from within the test environment.
If wait is set to true, the function waits until the executed process finishes before continuing execution.
Otherwise, the function starts the process asynchronously and immediately continues with the next instructions.

Parameter
- command - The path or name of the executable to run.
- args - Command-line arguments to pass to the executable.
- workingDir - The working directory for the process. Can be empty to use the default.
- wait - If true, waits for the process to complete before continuing.

Example
void main()
{
    Execute("notepad.exe", "example.txt", "C:\\Temp", true); // Opens Notepad with a file and waits until closed
    Execute("ping.exe", "127.0.0.1", "", false);           // Runs ping asynchronously
}
#define #include abs Array ceil CloseAUT Console mode do...while DoubleClick DragAndDrop Execute Fail File floor for Format GetAUTFileVersion GetAUTProductVersion GetAUTQtVersion GetAUTSuspectedCompiler GetAUTSuspectedFramework GetClipboard GetCurrentDate GetCurrentTime GetCurrentWorkingDir GetEnv GetName GetProcessID GetProcessIDHandle GetQtProperty GetText GetTimestamp GetValue Handle HasFocus IsAUT64Bit IsChecked IsEnabled IsVisible LeftMouseClick LeftMouseDown LeftMouseUp max MiddleMouseClick MiddleMouseDown MiddleMouseUp min MouseMove MouseWheel Pass pow Predefined Constants Print rand Regex RegexMatch RightMouseClick RightMouseDown RightMouseUp round Script Language SendKeys SendMessage SetClipboard SetFocus SetGlobal SetQtProperty ShellProcess Sleep sqrt srand StartAUT string TerminateProcess TimerStart TimerStop TimerVerifyLess vec2d VerifyContains VerifyEmpty VerifyEndsWith VerifyEqual VerifyExists VerifyFalse VerifyGreater VerifyGreaterEqual VerifyLess VerifyLessEqual VerifyNotEqual VerifyNotExists VerifyScreenCompareEdgeBased VerifyScreenComparePixelExact VerifyStartsWith VerifyTrue WaitForControl WaitUntilEnabled WaitUntilVisible while