in our application for example, the context menu will contain more elements as the user can see, they are marked as off-screen because they will be only visible in other context.
So the list of elements in MenuBar.TopLevelMenu is greater than the user can see.
If I want to test the context menu, I'm only interested in elements which are not marked as off-screen.
the Menu elements has all the flag Visible = false.
Or did you mean how the developer hide the menu entries?