0

I have been unable to get a teststack window object by only using an automationelement or window handle. By looking at source code, I can see that this functionality is protected.

Does anybody know of an easy way to do this. Without finding the app first then using window finder function as i already know the window.

Thanks Dan

Danhol86
  • 1,352
  • 1
  • 11
  • 20
  • what do you mean you already know the window? the title of the window you want? if so, you can get the window with title using: `application.GetWindow("Window Title Here");` – Suhaib Ahmad Apr 10 '18 at 09:07
  • I mean I already know the window handle (hwnd) and therefore can get the AutomationElement for the window. However when trying to use teststack I don't want to have to first get the app and then loop through all windows using title etc. Looking at the source code. The winfowfactory has a Create method which takes an AutomationElement but this is private. – Danhol86 Apr 11 '18 at 07:38

0 Answers0