This project is read-only.

Is there a way of getting a Popup element ?

Mar 16, 2012 at 4:20 PM

We are using some Popup (System.Windows.Controls.Primitives.Popup) in our UI, and we can not find a way to retreive them with white and accessing to buttons or checkboxes defined in it.

Is there anyone knowing a way to do that ? 

Many thanks,



Apr 2, 2012 at 7:21 AM

Try accessing them as windows.

Primitivies.Popup is used as fadeaway info messages, as dropdown lists in combobox and calender controls in the application i am currently testing.

I get them as a window with empty title and add an additional check by verifying the first item in the window to make sure i am getting the correct pop-up.

Apr 2, 2012 at 12:10 PM


thanks for your answer. We tried it and use the following code to retrieve the window.
Window popup = _mainWindow.ModalWindows()[0]

And it is now possible to have access to the button of the popup : 
SearchCriteria searchCriteria = SearchCriteria.ByAutomationId(automationId);
Button b = popup.Get<Button>(searchCriteria);

Many thanks.