getWindows() returns no window

Oct 27, 2010 at 1:16 PM

hi,

 

White.Core.Application p = White.Core.Application.Launch(setupFile);

p.WaitWhileBusy();

List<Windows> windows = p.GetWindows();

 

 

windows will be empty, and i have no idea how i can get the informations like uispy has (caption of the windows, class types etc.)

setupFile is the Foxit Reader Installation file...(FoxitReader411_enu_Setup.exe)

 

thanks for help

Oct 29, 2010 at 7:23 AM

Hi

 

I have never tried to automate an installer, but are you sure that p is the application which contains the window?

 

or is there an other application (started by installer) which might contain your window.

 

Throndorin

Oct 29, 2010 at 8:46 AM

 

 

modalWindows()  method will help??

 

 

Nov 4, 2010 at 9:54 AM
arunpk wrote:

 

 

modalWindows()  method will help??

 


 

No, because it throws an Exception

{"Couldn't find window with SearchCriteria  in process 20808, after waiting for 5000 ms\r\nName: Foxit Reader Install Wizard,  Bounds: -32000;-32000;160;24 ProcessId: 10212, Modal: False\r\nName: file:///C:/Dokumente und Einstellungen/makrorechner/Eigene Dateien/Reflector/Disassembler/ConsoleApplication1/bin/Debug/ConsoleApplication1.EXE,  Bounds: 154;154;668;331 ProcessId: 14692, Modal: False\r\nName: white - Discussions - Cannot find WPF windows by \"title\" - Mozilla Firefox,  Bounds: -4;-4;1288;1004 ProcessId: 18508, Modal: False\r\n  Name: white - Discussions - Cannot find WPF windows by \"title\" - Mozilla Firefox,  Bounds: 0;19;1280;977 ProcessId: 18508, Modal: (null)\r\n"}

I just executed the setup file, i dont know whats happening behind the scenes, maybe something other is creating the gui... unfortunatly i cannot extract the files inside the setup file

 

 

Nov 4, 2010 at 10:19 AM

Hi

do you want to test the installer? or the application himself?

if you don't want to test the installer, maybe try to install the application silent (have a look in the documentation of the used installer)

 

Throndorin

Nov 4, 2010 at 10:22 AM

Hi,

its not only this setup, there are many setups. I want to build an automated installer for many setups. Otherwise i would install it silent or use something like AutoIT

Nov 19, 2010 at 7:34 AM

Hi,

I can propose 2 ways:

1. Maybe WaitWhileBusy() does not work properly. And there are no windows yet, when you are trying to GetWindows(). Try to add sleep to check it.

2. It seems that your application is launched in some already exist process and has other processID (but not processID of your application p).  Try to find window using White.Core.Desktop.Instance.Windows(). Or try to close all running application before.