Micro Focus QTP (UFT) Forums
How to Handle Modal Dialogs In QTP - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: How to Handle Modal Dialogs In QTP (/Thread-How-to-Handle-Modal-Dialogs-In-QTP)



How to Handle Modal Dialogs In QTP - Jyobtech - 07-22-2015

Hi Experts,
I am using below code to handle Modal Dialogs in SAP but its not working .
Can you please correct the code or let me know in detail how to handle Modal Dialogs


Code:
'C:\closedialog.vbs

WScript.Sleep 400
Set oShell = WScript.CreateObject("WScript.Shell")
While Not oShell.AppActivate ("Save As"):Wend
oShell.SendKeys "{ENTER}"

'Obove code saved with the file name closedialog.vbs in C drive

I am calling the code in qtp by using the below code but its not working

Code:
SystemUtil.Run "wscript","c:\closedialog.vbs"

Please find the screenshot regarding the same