Forum Discussion

rfojta's avatar
rfojta
New Contributor
15 years ago

Window.Close doesn't allow to handle pop-up windows

I've migrated from TestComplete4 to TestComplete7 and some test doesn't work now. One of them is method for closing window.



There's code in JScript:



var win = ... // get window from mapping

win.Close(); // call close operation on window



var msg = ... // get pop-up which may appeared

if( msg.Exists ) msg.Window("Button", "&No").ClickButton(); // click No and close pop-up window

// Now the window should be closed.

-----



After migration to TC7 there's and error produced on Close() operation:

The window does not respond. - The window with the 0x0e3005b6 handle exists but did not respond during the auto-wait timeout (1000 ms).



I didn't find any bug reporting feature on this web pages, so I'm using forum instead.



Does anyone have similiar experience?

Thanks.

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    You could try to increase your auto-wait timeout.  It's set right now to 1 sec (1000 ms) which is rather short, actually (I believe the default is 10000 ms or 10 sec).  You could also add a loop on the window to wait until it is enabled using a WaitProperty call or while not win.Enabled.
  • rfojta's avatar
    rfojta
    New Contributor
    I've tried. But it doesn't matter how long the operation wait, because it waits until the next window is closed, but it never let the pop-up window to close.



    :(
  • Hi Richard,


    Could you please provide us with an application with which the problem can be reproduced? Also, please let us know whether the window in question can be closed manually at the moment the error occurs - I guess, the behavior is caused by the fact that the window is hanging, and therefore, it does not respond to the user input sent by TestComplete (as it is stated in the error message).


    BTW, you can also try clicking a close button or sending the Alt + F4  keystroke to the window instead of calling the Close method - this should help if the problem is that the window does not respond to TestComplete's specific action for some reason.