TestStack.White click MahApps Hamburger Menu item

131 Views Asked by At

Using TestStack.White I'm trying to click a menu item in the MahApps Hamburger Menu. For example, if I grab any example from their documentation, I'm able to capture a "HamburgerMenuIconItem" from TestStack like this:

var item = window.Get(SearchCriteria.ByAutomationId("Test")).GetParent<UIItem>();

Which looks correct with the "HamburgerMenuIconItem" name, and properties like the text and icon. But clicking it does nothing...

I've tried to put in a Button - either to wrap the text / label, or the icon, but that messes up the Command functionality of the menu item if there is a view declared in the Tag (what I probably need).

Any ideas on how I can click a MahApps menu item in a TestStack.White UI test?

0

There are 0 best solutions below