This project is read-only.

Window didn't respond

Aug 20, 2008 at 12:22 PM
I get a "Window didn't respond" timeout at random times with random actions, like on GetWindows(), Focus(), Click(), etc.
It happen just sometimes with no apparent reason, I increased the BusyTimeout and UIAutomationZeroWindowBugTimeout to even 2 minutes, but no luck, this problem happens when it wants without a proper reason.
Aug 20, 2008 at 4:37 PM
Can you send me the stack trace along with the message.
Oct 17, 2008 at 11:48 AM
Edited Oct 17, 2008 at 3:30 PM
I am getting the following when I try and Call GetWindows(). At this point I have verified that the application has started, there is a MainWindow and even set focus to it.

Exception Message

Window didn't respond, after waiting for 5000 ms

Exception StackTrace

at Core.UIItems.WindowItems.Window.WaitWhileBusy() in d:\white-os\Core\UIItems\WindowItems\Window.cs:line 189

at Core.UIItems.WindowItems.Window.InitializeWindow() in d:\white-os\Core\UIItems\WindowItems\Window.cs:line 54

at Core.UIItems.WindowItems.Window..ctor(AutomationElement automationElement, InitializeOption initializeOption, WindowSession windowSession) in d:\white-os\Core\UIItems\WindowItems\Window.cs:line 49

at Core.UIItems.WindowItems.WPFWindow..ctor(AutomationElement automationElement, WindowFactory windowFactory, InitializeOption initializeOption, WindowSession windowSession) in d:\white-os\Core\UIItems\WindowItems\WPFWindow.cs:line 15

at Core.Factory.ChildWindowFactory.Create(AutomationElement element, InitializeOption option, WindowSession windowSession) in d:\white-os\Core\Factory\ChildWindowFactory.cs:line 35

at Core.Factory.WindowFactory.DesktopWindows(Process process, ApplicationSession applicationSession) in d:\white-os\Core\Factory\WindowFactory.cs:line 58

at Core.Application.GetWindows() in d:\white-os\Core\Application.cs:line 170

I have investigated it further (thread - is quite similar as well) and found the problem is windows without Name, ID etc... In my case these happen to be ScreenTips. 0.16 dealt with this a little better in that it returned the UIItem. 0.17 throws an exception as detailed above. I guess I'd rather have the 0.16 behaviour, but if that's not desirable, then 0.17 behaviour but the real problem should be reported, not "Window didn't respond, after waiting for 5000 ms" although it's partly correct i.e. Window without a name, it's incorrect in that it didn't wait for 5000 ms.

Oct 18, 2008 at 6:55 PM
This might be similar, but before that can you send me the complete exception out.
Message, Stacktrace and same for inner exceptions.
Nov 11, 2008 at 9:08 AM

Inner exception is:

Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.

at Core.UIItems.WindowItems.Window.WaitWhileBusy() in d:\white-os\Core\UIItems\WindowItems\Window.cs:line 172

If you need further information, please let me know how I go about obtaining it. You may find it easier to reproduce the following and add a test for it:
From you mainwindow invoke another window (WPF popup or tooltip in WPF App in my case) which has no name or automationID definined and then try to:
List<Window> allWindows = mainwindow.ModalWindows();

Nov 19, 2008 at 6:21 PM
Sorry for really late response.
Can you check if this window has Window pattern? If no then it is bug which I would need to fix.
Nov 27, 2008 at 6:08 PM

I'm also having problems locating windows, but it seems to be a common problem to every testing framework I know.

I mean: I have a test, it works perfectly on my laptop, but then I move it to our testing boxes (three servers running VMWare and different OSs inside). The test is running on a Vista machine. My app shows up a window, but White can't find it. The weird thing is UISpy can't either!! It only happens once every three runs or so, and it looks like it is related to the CPU load. I mean, the more overloaded the box is, the more it fails.

Dec 5, 2008 at 4:00 PM
what is the error that you get when it fails?

Can you please do Desktop.Instance.LogStructure() and send me the console output. Please attach this in a file so that I can see the indentations.
Warning: Please close other windows on desktop which you dont need, as that might increase the size of the output as well might take longer dump.