Micro Focus QTP (UFT) Forums
Dialog winbutton OK problem in IE - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Dialog winbutton OK problem in IE (/Thread-Dialog-winbutton-OK-problem-in-IE)



Dialog winbutton OK problem in IE - dutchyes - 08-03-2010

Hi,
I am using qtp 10 on a windows terminalserver 2008. I make a connection to this server through a remote desktop connection(RDC).
I am running a qtp script which runs ok when i look at the runprocess in the RDC window. But when i run the script and minimize the RDC window,
the script fails always on one point. It's a IE browser dialog window. QTP gives a runtime error saying it does not find the object, which is an OK
winbutton that needs to be clicked. The endresult is that the ok button never gets clicked.
I tried descriptive programming, WinButton("text:=Cancel").Click,
also just absolute coordinates of the mousecursor to click.
Code:
Dim dr
Set dr = CreateObject("Mercury.DeviceReplay")
'dr.MouseClick 400, 500, 0
dr.MouseClick 330, 116,RIGHT_MOUSE_BUTTON

But nothing seems to help. Does anyone know a solution, in order for me to run the script without having the RDC window on the foreground?

On the site below you have the same dialogbox and the same error when clicking ok with a minimized RDC window.

http://www.htmlite.com/JS006.php

Code:
Browser("JavaScript - Confirm pop").Page("JavaScript - Confirm pop").Sync
Browser("JavaScript - Confirm pop").Navigate "http://www.htmlite.com/JS006.php"
Browser("JavaScript - Confirm pop").Dialog("Message from webpage").WinButton("OK").Click
Browser("JavaScript - Confirm pop").Dialog("Message from webpage").WinButton("OK").Click



RE: Dialog winbutton OK problem in IE - Saket - 08-03-2010

see if this thread helps

https://www.learnqtp.com/forums/Thread-Handling-pop-up-message?highlight=RDP