Our app has a menu button on the navigation bar but our tests don't seem to be able to select it.
We are setting the accessibility identifier for the UIBarButtonItem like this:
var menuButton = new UIBarButtonItem(UIImage.FromBundle("MenuIcon"), UIBarButtonItemStyle.Plain, ShowMenu)
AccessibilityIdentifier = NavigationMenuButtonIdentifier
NavigationItem.RightBarButtonItem = menuButton;
But when I capture the controls that are currently visible on the screen we see this:
Rect: 272 x 26, 43 x 30
Because the accessibility identifier doesn’t appear to be set our tests that are trying to open the menu are failing. Can anyone give any guidance on why the ID doesn’t appear to be getting set?
Or some more general advice on how to write tests that interact with a UIBarButtonItem?