[Watin-users] How to get a reference to an explorer window opened by the Adobe Acrobat Reader plug-
Brought to you by:
jvmenen
From: Miguel M. <mig...@am...> - 2007-07-09 14:46:34
|
Hi there, I have an explorer window with a button; when pressed it downloads a PDF file. Since I have the adobe acrobat reader plug-in installed, it opens in another internet explorer window. The code: IE.InternetExplorers().Length . does return the right number of explorer windows, but the code: IE adobeWindow = IE.InternetExplorers()[IE.InternetExplorers().Length -1]; ... times out. Is this a bug in WatiN? Or is it another way to get that reference to the explorer window that contains the PDF file? Somebody told me that when you try to get an explorer window with the code: IE adobeWindow = IE.InternetExplorers()[IE.InternetExplorers().Length -1]; . there's a call made to IECollection.GetIEByIndex : private static IE GetIEByIndex(ArrayList internetExplorers, int index) { IE ie = (IE)internetExplorers[index]; ie.WaitForComplete(); // --> Problem seems is here return ie; } It seems like WaitForComplete is never true with a PDF file opened. Can somebody confirm? Is this a bug to be fixed? Thanks, Miguel |