Micro Focus QTP (UFT) Forums
capturing message on web page when caps lock is on - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: capturing message on web page when caps lock is on (/Thread-capturing-message-on-web-page-when-caps-lock-is-on)



capturing message on web page when caps lock is on - helan - 04-29-2015

I am trying to capture the message "Caps lock on" password field displayed on the web page when the caps lock is on.
Problem I am facing is when I type manually on the web page with caps lock on the message is displayed.But using QTP code the message is not getting displayed on the page.Here is my code,can any one shed some light?
I tried using "Set" , Send Keys etc....but no luck...On debug mode when i enter another character manually in the password field the message is getting displayed...Help please...
Code:
//Launch app and enter user name
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe",  Parameter("URL")
Browser("xxx").Page("xxx").WebEdit("logonId").Set DataTable ("pUserName",dtGlobalSheet)
//make caps lock on
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{CAPSLOCK}"
//Password
Browser("xxx").Page("xxx").WebEdit("logonPassword").Click
Set oShell = CreateObject("WScript.Shell")
wait 1
oShell.SendKeys "h"
wait 1
Setting.WebPackage("ReplayType") = 2
Browser("xxx").Page("xxx").WebEdit("logonPassword").Click
oShell.SendKeys "{END}"
oShell.SendKeys "B"