Class: Mohawk::Adapters::UIA::MenuItem

Inherits:
Control
  • Object
show all
Defined in:
lib/mohawk/adapters/uia/menu_item.rb

Defined Under Namespace

Classes: MenuItemNotFound

Instance Method Summary collapse

Methods inherited from Control

#disabled?, #enabled?, #focus, #handle, #initialize, #method_missing, valid_patterns, #value, #view, #visible?

Methods included from Waiter

#wait_until

Constructor Details

This class inherits a constructor from Mohawk::Adapters::UIA::Control

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Mohawk::Adapters::UIA::Control

Instance Method Details

#clickObject



12
13
14
# File 'lib/mohawk/adapters/uia/menu_item.rb', line 12

def click
  until_successful { element.menu_item(*path).click_center }
end

#exist?Boolean Also known as: exists?

Returns:

  • (Boolean)


16
17
18
# File 'lib/mohawk/adapters/uia/menu_item.rb', line 16

def exist?
  !!element.menu_item(*path)
end

#selectObject



8
9
10
# File 'lib/mohawk/adapters/uia/menu_item.rb', line 8

def select
  until_successful { element.select_menu_item(*path) }
end