Method: AX::Application#select_menu_item

Defined in:
lib/ax/application.rb

#select_menu_item(*path) ⇒ AX::MenuItem

Navigate the menu bar menus for the receiver and select the menu item at the end of the given path. This method will open each menu in the path.

Examples:


safari.select_menu_item 'Edit', 'Find', /Google/

Parameters:

  • path (String, Regexp)

Returns:

  • (AX::MenuItem)


347
348
349
350
351
# File 'lib/ax/application.rb', line 347

def select_menu_item *path
  target = navigate_menu(*path)
  target.perform :press
  target
end