Menu: any = MenuInteractor

Call this InteractorConstructor to initialize a menu Interactor. The menu interactor can be used to interact with menus on the page and to assert on their state.

The menu is located by the aria-label attribute or the visible text on the menu in otherwise.

await Menu('Options').open();
await Menu('Options').is({ disabled: true });
await Menu({ id: 'options', disabled: true }).exists();
  • title: string – Filter by title
  • id: string – Filter by id
  • visible: boolean – Filter by visibility. Defaults to true. See isVisible.
  • disabled: boolean – Filter by whether the menu is disabled. Defaults to false.
  • focused: boolean – Filter by whether the menu is focused. See focused.
  • open(): Interaction – Open the menu
  • click(value: string): Interaction – Click on the menu's item
  • focus(): Interaction – Move focus to the menu
  • blur(): Interaction – Move focus away from the menu