Script.ConnectToProcess

Connects to an application running on the test computer. Use this statement to connect to an application without starting it from the script or for testing applications that run in the background, such as a Windows service.

Note: When the script runs, the process identified in the ConnectToProcess statement must be running on the test computer or the script will fail.

This statement must be preceded by the Script.SetContext statement so QA Wizard Pro knows which version in the application repository the process is related to. If you record additional steps in an existing script, new controls are automatically added to the application specified in the SetContext statement.

When you record a script against a running process, this statement is automatically added to the script after the SetContext statement. You can also manually add it.

Note: This statement is not supported in scripts that test Windows 8 applications. Use the Script.RunApp statement to start a Windows 8 application or make it the active window.

Syntax

ConnectToProcess("ProcessName")

Arguments

Argument Description
ProcessName Executable process to connect to. If you do not know the process name, add this statement from the Add Statement dialog box to select the running process. You can also view running process names and descriptions on the Processes tab in Windows Task Manager. See the Windows help for information.

Supported objects

Script

Example

Script.SetContext("Notepad/5.1")

Script.ConnectToProcess("notepad.exe")