0

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?

Werner
  • 1,229
  • 1
  • 10
  • 24
  • 1
    I believe TestStack.White only works with built-in Windows(WPF) controls. I tried to write tests for some 3rd party controls (like Infragistics) and it didn't work. – Michael Daniloff Oct 05 '18 at 18:35
  • Seems you are right unfortunately - I've been doing some tests that confirms this. Add to that, that it would seem that MahApps have not considered automation in their design either. If you want to add your comment as an answer? I can accept that and close... – Werner Oct 09 '18 at 09:18

0 Answers0