This project is read-only.

Attach to Window

Jan 15, 2010 at 1:12 AM

Hi All,

I can use the following code to attach 'NotePad'.

Window window = application.GetWindow("Untitled - Notepad", InitializeOption.NoCache);


However, when I try to attach to other windows app like (MSN), it doesnt work. It gives me "Couldn't find window with title Windows Live Messenger in process 3320, after waiting for 5000 ms"


What's the reason? How can I attach to these windows? 



Jan 17, 2010 at 2:48 PM

you cannot find all windows from same application object. you would have to create an application object specific to the window you are trying to get.

Jan 19, 2010 at 1:44 AM

Thanks for your reply. 

I can attach to "notePad", MSN(Win32Window).

However, I still cannot attach to the application I wrote in Visual Studio C#.

I tried the following codes, they dont work.


 Window window = application.GetWindow("TestApp", White.Core.Factory.InitializeOption.NoCache);

Window window = (White.Core.UIItems.WindowItems.Win32Window)application.GetWindow("TestApp", White.Core.Factory.InitializeOption.NoCache);



Jan 28, 2010 at 4:08 PM

how are you creating the application object?