Note that there are some explanatory texts on larger screens.

plurals
  1. POWith C# 4.0, the System.Windows.Window constructor doesn't support any arguments
    text
    copied!<p>I would like to implement this suggestion: <a href="https://stackoverflow.com/questions/7500339/how-to-test-file-download-with-watin-ie9/8532222#8532222">How to test file download with Watin / IE9?</a></p> <p>In the project, I added the references that poster referred to:</p> <ul> <li>UIAutomationClient</li> <li>UIAutomationTypes</li> </ul> <p>However, Window wasn't resolved. So I added the following two references which resolved Window:</p> <ul> <li>PresentationCore</li> <li>PresentationFramework</li> </ul> <p>However, the System.Windows.Window constructor doesn't support any arguments, yet the poster has an argument:</p> <pre><code>Window windowMain = new Window(WatiN.Core.Native.Windows.NativeMethods.GetWindow(browser.hWnd, 5)); </code></pre> <p>The poster states that their solution works with .net 4 which is what my project is using, and it's full framework, not the client profile. Is the use of PresentationCore/Framework incorrect? I did try a reference to System.Windows.Forms, but Window isn't a class of it.</p> <p>Let me be exceptionally clear as to what I'm trying achieve as I guess it wasn't obvious enough. I would like to implement the poster's solution as noted in the link in the first sentence of my question. Adding the references to UIAutomationClient/Types didn't resolve the Window object. So, I went looking for Window in the framework and found it in PresentationCore/Framework. By the response I got, I obviously shouldn't be using PresentationCore/Framework. So that's why I asked the question.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload