Fail to get multiple windows with owner = null

18 views
Skip to first unread message

Wang Hei Leung

unread,
Jun 13, 2018, 4:25:53 AM6/13/18
to TestStack.White
Hi everybody,

I encountered a weird test failure related to multi-window test.  Any advice would be much appreciated.

Here is a simplified version of the test,
  1. Application launch with the main window
  2. Create a new window
  3. Check the new window exists.
Application.GetWindows() always return 1 window regardless how many new windows are created in step (2)


Meanwhile, my application will set all window.Owner to null. This is to show each window as separate items in the Windows Taskbar.

UIVerify shows the new window and main window at the same levels in its component tree, which matches the owner=null setting.

I doubt that White cannot access the new windows because of they are detached from the main window?

Any other means to access "detached" windows in White? 

Regards,
Leung Wang Hei



Mike Hetzer

unread,
Jun 13, 2018, 11:38:18 AM6/13/18
to TestStack.White
I would venture a guess that the 2nd window is part of another process?
Do both windows share the same process ID?
If they do - you maybe have to reattach to the application process to "discover" the new window.
Reply all
Reply to author
Forward
0 new messages