QTP Script:How to turn On and turn Off Capslock using SendKeys in QTP?




QTP SCript to turn on Capslock using SendKeys in QTP


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{CAPSLOCK}"
Msgbox"CapsLock is ON"
WshShell.SendKeys "{CAPSLOCK}"
Msgbox"CapsLock is OFF"


Similarly we can turn On/Off NumLock and ScrollLock also.

WshShell.SendKeys "{NUMLOCK}"

WshShell.SendKeys "{SCROLLLOCK}"

1 comment:

Anonymous said...

Im getting error - Object required: 'WScript'

Please clarify

Related Posts Plugin for WordPress, Blogger...