04-29-2015, 05:25 AM
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...
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"