jsc
13 years agoRegular Contributor
Unexpected window not handled by test
Hi all,
I got sometimes do have problems with an unexpected windows, that unfortunately are not handled by my test correctly.
The window that currently causes my test to hang can be seen in the attachment. The parent process' name is: "genesis.exe"
I do 3 things to make my test handle such problems:
1) project settings:
on unexpected window: press Esc, press Enter, Send WM_CLOSE, Click on focused control
>> Escape, Enter and focused control should close this window (manually tested), but the test does not!
2) event handler for unexpected windows (see end of text)
>> window.close does not close this window
3) event handler for timeout (see end of text)
>> My event handler for timeout is not called after a few minutes. (timeout time is 6 minutes)
>> itdGenesis.killClient() contains the killing of the parent process "genesis.exe".
So my questions are:
1. why is the window not closed by the settings to close unexpected windos (esc, enter, focused control)?
2. why is my event handler for timeout not called after few minutes? (the test hung for a whole night!)
I hope somebody can help me with this, as I thought my test is able to deal with this.
Thanks a lot in advance,
Joachim
--------------------------------------------------------------------------
function OnTimeout(Sender, Params)
{
Params.Break = true;
Log.Message("#itdLogCode#OnTimeout# Testitem '" + Project.TestItems.Current.Name + "' hat die Timeout-Zeit von " + Project.TestItems.Current.Timeout + " Minuten ueberschritten.");
itdGenesis.killClient();
return Params;
}
function OnUnexpectedWindow(Sender, Window, LogParams)
{
Log.Error("#itdLogCode#OnUnexpectedWindow# Unexpected window");
Log.Picture(Sys.Desktop.Picture(), "Unexpected window", "This image was added to TestLog from the GeneralEvents_OnUnexpectedWindow procedure");
Window.Close();
}
I got sometimes do have problems with an unexpected windows, that unfortunately are not handled by my test correctly.
The window that currently causes my test to hang can be seen in the attachment. The parent process' name is: "genesis.exe"
I do 3 things to make my test handle such problems:
1) project settings:
on unexpected window: press Esc, press Enter, Send WM_CLOSE, Click on focused control
>> Escape, Enter and focused control should close this window (manually tested), but the test does not!
2) event handler for unexpected windows (see end of text)
>> window.close does not close this window
3) event handler for timeout (see end of text)
>> My event handler for timeout is not called after a few minutes. (timeout time is 6 minutes)
>> itdGenesis.killClient() contains the killing of the parent process "genesis.exe".
So my questions are:
1. why is the window not closed by the settings to close unexpected windos (esc, enter, focused control)?
2. why is my event handler for timeout not called after few minutes? (the test hung for a whole night!)
I hope somebody can help me with this, as I thought my test is able to deal with this.
Thanks a lot in advance,
Joachim
--------------------------------------------------------------------------
function OnTimeout(Sender, Params)
{
Params.Break = true;
Log.Message("#itdLogCode#OnTimeout# Testitem '" + Project.TestItems.Current.Name + "' hat die Timeout-Zeit von " + Project.TestItems.Current.Timeout + " Minuten ueberschritten.");
itdGenesis.killClient();
return Params;
}
function OnUnexpectedWindow(Sender, Window, LogParams)
{
Log.Error("#itdLogCode#OnUnexpectedWindow# Unexpected window");
Log.Picture(Sys.Desktop.Picture(), "Unexpected window", "This image was added to TestLog from the GeneralEvents_OnUnexpectedWindow procedure");
Window.Close();
}