Timeout on GetWindow() and GetWindows(), can I get a Window based on an AutomationElement?

Aug 10, 2009 at 1:37 PM

Hi,

I'm getting a Timeout while calling GetWindow or GetWindows of Application object. As I could get the AutomationElement of the window using directly UIAutomation I'd like to know if I can create a Window instance based on a valid AutomationElement.

 

Thanks!!

 

LucasC

Coordinator
Sep 4, 2009 at 1:29 AM

you can so something like

new WinFormWindow(element, InitializeOption.NoCache, new NullWindowSession())

or something similar depending on your platform

new WPFWindow(element, WindowFactory.Desktop, option, windowSession)

new Win32Window(element, WindowFactory.Desktop, option, windowSession)