Unable to get a window in Windows XP, but can on WIndows 7

Aug 15, 2011 at 9:50 PM


Have a simple .NET 4 application, that has a main window and a button, clicking on which another window is poped up as a Modal window.

In UISpy and VisualUIVerify I can clearly find this window by its title, among children of a main window. My PC is Windows 7 x64 SP1, Enterprise.

But on Windows XP SP3 with all updates, .NET 3.5 SP1 Full and .NET 4 Full installed I cannot get this window using White. VisualUIVerify cannot be run on that machine, because when I launch it I get an error:

The type initializer for 'System.Windows.Automation.AutomationElement' threw an exception.

UISpy shows the modal window in its list with all properties with no problems - this is on my test Windows XP.

What can cause such behavior with modal windows? How can I get my window on XP?