Mercury.Devicereplay Method in QTP




Mercury.DeviceReplay  And Presskey method in QTP :

Set obj = CreateObject("Mercury.DeviceReplay")
Window("Notepad").Activate
obj.PressKey 63 

The PressKey method uses the ASCII value for the key.

63 is the ASCII value for F5.
ASCII values for other keys:
F1 - 59
F2 - 60
F3 - 61
F4 - 62
F5 - 63
F6 - 64
F7 - 65
F8 - 66
F9 - 67
F10 - 68
F11 - 87
F12 – 88


For gaining more insights in the automation using QTP log on to below url :

Automation Testing Using QTP


Post a Comment

Previous Post Next Post