jsc
14 years agoRegular Contributor
unexpected window - test stopped despite active error handling
Hi all,
on my last test, an error window popped up. My test stopped on this window, I expected the test to keep on running and handling this unexpected window.
My settings are:
1) on unexpected window:
a) click on focused control
b) Press Esc
c) Press Enter
d) Send WM_Close
a), b) and c) would have closed the window (I did not try d)), but it kept open...
My Error (code see below) handler did not do anything at all. There was no Error.Log entry pointing to an unexpected window.
Can anybody help me, what went wrong?
Kind regards,
Joachim
Error handler:
function OnUnexpectedWindow(Sender, Window, LogParams)
{
//LogParams.Locked = true;
// Post an error message about unexpected windows to the test log
Log.Error("Unexpected window");
// Post an image of the whole screen to the test log
Log.Picture(Sys.Desktop.Picture(), "Unexpected window", "This image was added to TestLog from the GeneralEvents_OnUnexpectedWindow procedure");
// Close the unexpected window
Window.Close();
}
on my last test, an error window popped up. My test stopped on this window, I expected the test to keep on running and handling this unexpected window.
My settings are:
1) on unexpected window:
a) click on focused control
b) Press Esc
c) Press Enter
d) Send WM_Close
a), b) and c) would have closed the window (I did not try d)), but it kept open...
My Error (code see below) handler did not do anything at all. There was no Error.Log entry pointing to an unexpected window.
Can anybody help me, what went wrong?
Kind regards,
Joachim
Error handler:
function OnUnexpectedWindow(Sender, Window, LogParams)
{
//LogParams.Locked = true;
// Post an error message about unexpected windows to the test log
Log.Error("Unexpected window");
// Post an image of the whole screen to the test log
Log.Picture(Sys.Desktop.Picture(), "Unexpected window", "This image was added to TestLog from the GeneralEvents_OnUnexpectedWindow procedure");
// Close the unexpected window
Window.Close();
}