| || |
unable to click OK on window pop up dialog box when machine is locked out
I am looking for help for following i.e. QTP is not recognizing window pop up dialog box when run in unattended mode or machine is locked out.
I need to click Ok button on windows pop up dialog box but couldn't.
Thanks! It worked when machine is locked out. I tried following
Public Const WM_COMMAND = 273 'Converted to decimal from &H111 to avoid QTP syntax error
Extern.Declare micLong, "PostMessage", "user32.dll", "PostMessageA", micHwnd, micLong, micLong, micLong
windowTitle = "Windows Internet Explorer" 'change it for different dialog box
buttonCode = 1 ' 1- OK, 2 Cancel in this dialog. It is "window id" property of the Button that you need to click - use Object Spy
Hwnd = Window("regexpwndtitle:="&windowTitle).GetRoProper ty("hwnd")
lResult = extern.PostMessage(Hwnd, WM_COMMAND, buttonCode, 0)