Window.Close doesn't allow to handle pop-up windows
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
04:23 AM
03-16-2010
04:23 AM
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.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2010
11:58 PM
03-16-2010
11:58 PM
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
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010
12:00 AM
03-17-2010
12:00 AM
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.
😞
😞
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2010
02:35 AM
03-17-2010
02:35 AM
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
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
