Micro Focus QTP (UFT) Forums

Full Version: How to Handle Modal Dialogs In QTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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