Saturday 28 July 2012

QTP - Send Keys - Cheat Sheet

Leave a Comment


QTP Send keys Implementation
QTP SendKeys – Cheat Sheet
QTP – WScript – Send Keys
HowTo – Use Sendkeys in QTP









A quick cheatsheet for all the characters that can be sent using the sendkeys method:

Example:
Set WshShell = CreateObject("WScript.Shell") 
'Control+Shift+End
WshShell.SendKeys "^+{END}"

'Control+O
WshShell.SendKeys "^o"


Some common examples:
1. a and b are pressed, send the string argument : “(ab)”
2. To Send same letter multiple times : “{a 10}”
3. To Send ALT Tab :  wshell.sendkeys ” %{TAB}”
4. To Send ALT and space : wshell.sendkeys “%{ }”
5. TO Send char : wshell.Sendkeys “(a)”
6. Right Click of Mouse : Wshell.SendKeys “+{F10}”
7. Mouse Down : wshell.sendkeys “{DOWN}”
8. Mouse UP : wshell.sendkeys “{UP}”

Key
Argument

BACKSPACE
{BACKSPACE}, {BS}, or {BKSP}

BREAK
{BREAK}

CAPS LOCK
{CAPSLOCK}

DEL or DELETE
{DELETE} or {DEL}

DOWN ARROW
{DOWN}

END
{END}

ENTER
{ENTER} or ~

ESC
{ESC}

HELP
{HELP}

HOME
{HOME}

INS or INSERT
{INSERT} or {INS}

LEFT ARROW
{LEFT}

NUM LOCK
{NUMLOCK}

PAGE DOWN
{PGDN}

PAGE UP
{PGUP}

PRINT SCREEN
{PRTSC}

RIGHT ARROW
{RIGHT}

SCROLL LOCK
{SCROLLLOCK}

TAB
{TAB}

UP ARROW
{UP}

F1
{F1}

F2
{F2}

F3
{F3}

F4
{F4}

F5
{F5}

F6
{F6}

F7
{F7}

F8
{F8}

F9
{F9}

F10
{F10}

F11
{F11}

F12
{F12}

F13
{F13}

F14
{F14}

F15
{F15}

F16
{F16}


Key
Special Character
SHIFT
+
CTRL
^
ALT
%



0 comments:

Post a Comment

Saturday 28 July 2012

QTP - Send Keys - Cheat Sheet



QTP Send keys Implementation
QTP SendKeys – Cheat Sheet
QTP – WScript – Send Keys
HowTo – Use Sendkeys in QTP









A quick cheatsheet for all the characters that can be sent using the sendkeys method:

Example:
Set WshShell = CreateObject("WScript.Shell") 
'Control+Shift+End
WshShell.SendKeys "^+{END}"

'Control+O
WshShell.SendKeys "^o"


Some common examples:
1. a and b are pressed, send the string argument : “(ab)”
2. To Send same letter multiple times : “{a 10}”
3. To Send ALT Tab :  wshell.sendkeys ” %{TAB}”
4. To Send ALT and space : wshell.sendkeys “%{ }”
5. TO Send char : wshell.Sendkeys “(a)”
6. Right Click of Mouse : Wshell.SendKeys “+{F10}”
7. Mouse Down : wshell.sendkeys “{DOWN}”
8. Mouse UP : wshell.sendkeys “{UP}”

Key
Argument

BACKSPACE
{BACKSPACE}, {BS}, or {BKSP}

BREAK
{BREAK}

CAPS LOCK
{CAPSLOCK}

DEL or DELETE
{DELETE} or {DEL}

DOWN ARROW
{DOWN}

END
{END}

ENTER
{ENTER} or ~

ESC
{ESC}

HELP
{HELP}

HOME
{HOME}

INS or INSERT
{INSERT} or {INS}

LEFT ARROW
{LEFT}

NUM LOCK
{NUMLOCK}

PAGE DOWN
{PGDN}

PAGE UP
{PGUP}

PRINT SCREEN
{PRTSC}

RIGHT ARROW
{RIGHT}

SCROLL LOCK
{SCROLLLOCK}

TAB
{TAB}

UP ARROW
{UP}

F1
{F1}

F2
{F2}

F3
{F3}

F4
{F4}

F5
{F5}

F6
{F6}

F7
{F7}

F8
{F8}

F9
{F9}

F10
{F10}

F11
{F11}

F12
{F12}

F13
{F13}

F14
{F14}

F15
{F15}

F16
{F16}


Key
Special Character
SHIFT
+
CTRL
^
ALT
%



No comments:

Post a Comment