Close Method (ConsoleWindow)

Class

ConsoleWindow.

Action

Closes the console.

Syntax

consoleWindow.Close ([sItemIdentifier])
Variable Description
sItemIdentifier The index of the console window or the caption of the window. If this parameter is left blank, Silk Test Workbench closes the first found console window. STRING.

Example 1

The following sample shows how you can use the index to define that you want to close the second console window:
consoleWindow.Close(2)

Example 2

The following sample shows how you can use the full identifier of a console window to close the console window:
consoleWindow.Close("C:\\Windows\\system32\\cmd.exe[1]")