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?
Related
Background: So I am Implementing react-native-image-layout to create a gallery view where you can click on the image and then the image appears on modal and then you have headers and footers where you can add buttons which can do some functionality like close the modal n all.
Example: Now I want something like this: like there is a menu popped over
My Implementation: And this is where I actually want it. The ImageViewer I created <--- I want the menu when I click that dot-horizontal button.
I have card div with a button. when I click this button it should dropdown a menu. I want to make auto scroll to menu view when clicking this button, but I want to achieve that only on mobile phone not on desktop. is that possible?
Have you tried window.scrollTo()?
I want to create a button with a down arrow icon that displays a menu when clicked. I have found the following button type:
But this button can be pressed in two places (on the left of the vertical line and on the right of the vertical line), also I don't want the button to have a vertical line, I want it to be something like this:
Can this be done in Windows API?
What you are looking for can be done using either:
a standard COMBOBOX control with the CBS_DROPDOWNLIST window style:
(source: s-msft.com)
A Menu button:
(source: s-msft.com)
However, this is not a standard Win32 control. MFC has a CMFCMenuButton class for it, but in Win32 you have to owner-draw a standard BUTTON control to achieve the same effect:
Menu button arrow with raw Win32
When the button is pushed, you can display your pop-up menu as needed, using TrackPopupMenu() or equivalent.
I have a situation where I roll over a row in a grid, I want to display a menu. I put the menu in a tooltip. But can't click on a menu unless I make the tooltip closable. If I make the tooltip closable, I can't provide the use the autohide functionality and I have to click to close the tooltip. Is there any way to mouseover rows in a grid, show a tooltip that includes clickable items and then have the tooltip goaway when you scroll off of it?
you may need extend your own component from tooltip.
I have a context menu and inside are two menu items. To remove the check mark and icon for the menu items i've created a style which is working great. However i've noticed that in the background there is a vertical separator which i can't get rid of using style for context menu. Any help?