cancel
Showing results for 
Search instead for 
Did you mean: 

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

Highlighted
New Contributor

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 3
Highlighted
Community Hero

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

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.

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

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

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.



😞
Highlighted

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

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.



Best regards,
Alexey

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors