| || |
Function to close a pop-up window
I need help in writing a function to close a pop-up window for a web application. The code which I have written fails to recognize the pop-up when it runs in batch.
Set PopWin=Window("hwnd:=" & PopupDialog)
I am calling the function in my script as
PopUp((Browser("abc").Dialog("Micrsoft Internet Explorer"))
And it fails to recognize the "Object".
Any help is appreciated.
Re: Function to close a pop-up window
When you use Object.GetROProperty("hwnd")
that means the object needs to be recognized by QTP before it can return it handle. And QTP can recognized the object then you dont need to use the hwnd thing. You can directly say