When I'm in QTP and am automating a Gmail session a lot of the pages are dynamic. I need the line of code that will enable me to use keyboard shortcut keys within any of the gmail UI's.
Asked
Active
Viewed 152 times
0
-
have you tried anything specially sendkeys method? – Amol Chavan Jun 20 '12 at 04:55
1 Answers
2
There are several ways to simulate keyboard action from QTP, this article describes some of them. Especially check out DeviceReplay
.
From the linked post:
Set obj = CreateObject("Mercury.DeviceReplay")
Window("Notepad").Activate
obj.PressKey 63
Note: The PressKey method uses the appropriate ASCII or IBM Scan Code value for the key. "63" is the IBM Scan Code value for F5.

Ankur Jain
- 236
- 1
- 8

Motti
- 110,860
- 49
- 189
- 262
-
Nice answer, most people would come up with a WshShell.Sendkeys solution while DeviceReplay is sometimes more usefull. – AutomatedChaos Jun 20 '12 at 07:52