Ask a Question

Unexpected window message generating error and failing test

gagan
New Contributor

Unexpected window message generating error and failing test

Hi 

If someone can point what is happening here and how this can be fixed 

 

I am testing desktop winform based app i am clicking a submenu item, on click a confirmation popup appears and yes button on confirmation popup  is clicked, that is it.

 

When I run my  function it works correctly AUT works correctly as expected yet Testcomplete logs as unexpected window error message 

I am struggling to find why does it show this message 

first it is not unexpected window, it is expected window second expected window is handled and closed , AUT works correctly and closes popup

yet it logs unexpected window could not be closed message 

 

On menu click there is no other window appearing except confirmation popup which is expected 

 

Here is my function 


function ReleaseMF()
{
OpenManifestForm();
LoadManifest("MFTransh1");
ClickManifestMenuRelease();
LogMessage( " after submenu release click")
PopupCloseWithTimeOut(popupQuestionCaption,btnYesPopup, 4000 );
LogMessage( " after popup has been closed");

 

gagan_0-1633652501038.png

 

Thanks

Gagan

 

2 REPLIES 2
mattb
Staff

In your current project properties, within playback, see what instructions testcomplete has set for Unexpected windows. It could be trying to close the unexpected window:https://support.smartbear.com/testcomplete/docs/testing-with/running/handling-errors/unexpected-wind...

 

 
 

pp.png
Since we want to interact with the unexpected window I would remove all of the on unexpected window commands like Press Esc, Press Enter etc.

gagan
New Contributor

I have already cleared those settings, it looks like this 

gagan_0-1633905562605.png

Also this is an expected window which is being treated as unexpected window, 

cancel
Showing results for 
Search instead for 
Did you mean: