ConsoleClass.
Sends a set of keystrokes to the specified console.
This functionality is supported only if you are using the Open Agent.
Console.TypeKeysInWindow (sEvents, sItemIdentifier)
Variable | Description |
---|---|
sEvents | The keystrokes to type. STRING. |
sItemIdentifier | The index of the console window or the caption of the window. If this parameter is left blank, Silk Test Classic sends the keystrokes to the first found console window. STRING. |
The following code samples execute the dir command on the specified console window to list all the files and directories in the current directory:
//dir is executed on the second console window Console.TypeKeysInWindow ("dir<Enter>", 2)
//dir is executed on the specified console window Console.TypeKeysInWindow ("dir<Enter>", "C:\\Windows\\system32\\cmd.exe[1]")