To type keyboard input onto the open window
To type keyboard input on a open window, use .Type command
e.g. Following Example will type ALT+ F action in notepad document.
Window("Notepad").Activate
Window("Notepad").WinEditor(“Edit”).Type micAltDwn + "F" +micAltUp
Note:- For all type keyword please see below (reference Quicktest Professional help)
Note:- If .type method doesn't works then its worth trying DeviceReplay
'Here is an example that does the same thing above, but used DeviceReplay.
Set obj = CreateObject(“Mercury.DeviceReplay”)
Window("Notepad").Activate
obj.PressKey 63
The PressKey method uses the appropriate ASCII or IBM Scan Code value for the key. “63″ is the IBM Scan Code value for F5.
Following material is copied from QuickTest Professional Help File.
object.Type KeyboardInput
Argument | Description |
object | A test object of type AcxButton. |
KeyboardInput | Required. A String value. The text string and/or constants representing non-alphanumeric keys. The following constants are available: |