How to access the pop up windows as a result of click
Situation
I fill a form and then click the submit button and on the submit a pop up window appears which needs a confirmation
So I have the following code to handle this
function CheckUnexpectedWindow()
Dim p, unexpWnd
Set p = Sys.Process("iexplore",2)
' Handle possible unexpected windowSet unexpWnd = p.WaitWindow("#32770",, -1, 500)
If unexpWnd.Exists Then
' Post the window image to the logCall Log.Picture(unexpWnd.Picture, "Unexpected window detected.")
' Close unexpected windowaqObject.RaiseEvent Project, "OnUnexpectedWindow", "", unexpWnd, ""
'unexpWnd.Close
if unexpWnd.WaitWindow("Button", "OK", -1, 100).Exists then
unexpWnd.Window("Button", "OK", 1).Click()
end if
End If
end function
But once we perform click action the test completes hangs and does not come into this function which is equipped to handle the pop up window
But if you manuall perform a confirm action on the pop up window then test complete resumes
So what i feel is happening is that
Test complete is waiting for a response from the Iexplore process which is waiting for the response from pop up window and its a dead lock situation
Could anyone please send me the solution how to resolve this
Regards
Anand