Start Application

A Start Application building block is used to start a new application when working with desktop automation. Fully expanded, the Start Application block shows the following properties:

Start-Application

The Block Header (Start Application)

The green input connector in the header is used to trigger the block to start executing.

The green output connector in the header triggers when the desktop application has been opened.

The title of the block “Start Application” can be changed by double-clicking on it and typing in a new title.

Application

The application to start when the building block executes. This should contain the path to the “.exe” file for the program that is to be started.

This field works relative to the folder specified in the “Working folder” property, but can also contain the full path of the application.

Clicking the “Capture” button allows an easy selection of any already open application/windows or any shortcut pointing to an application, capturing all information needed about the selected application back into LEAPWORK.

Text fields

Fields that enable the use of external values (dynamic data) in the “Application to start” (path or exe).

To use the value of an added field, right-click the text field above where the application to start (path or .exe) can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Working folder

The “Working folder” sets the base directory for running the command. This means that the use of fully-qualified file paths is not required in the command field as it will be relative to the working directory path.

Text fields

Fields that enable the use of external values in the “Working folder” (path).

To use the value of an added field, right-click the text field above where the “Working folder” (path) can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Argument

Argument defines the parameter supplied to the program when it is invoked.

Text fields

Fields that enable the use of external values in the “Arguments”.

To use the value of an added field, right-click the text field above where the “Argument” can be entered and select “Insert token” and then insert this field’s name.

Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.

Use any opened

If the checkbox is checked, then it will detect and use the already opened instance of the application UI window. Please note, for Universal Windows Platform type applications 'Use any opened' option only works when the application is captured using capture button in Start Application block.

Error occurred

If the “Start Application” returns an error during execution you can use this output connector to branch your flow.

Window

Once the desktop application window is found and focus is set, this property contains a handle to the window. This can be used in cases where multiple application windows are opened during a case run, to direct other building blocks to use a specific window.