I would like to implement this suggestion: How to test file download with Watin / IE9?
In the project, I added the references that poster referred to:
- UIAutomationClient
- UIAutomationTypes
However, Window wasn't resolved. So I added the following two references which resolved Window:
- PresentationCore
- PresentationFramework
However, the System.Windows.Window constructor doesn't support any arguments, yet the poster has an argument:
Window windowMain = new Window(WatiN.Core.Native.Windows.NativeMethods.GetWindow(browser.hWnd, 5));
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.
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.