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?, #element, #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



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

def click
  menu_item.click_center
end

#exist?Boolean Also known as: exists?

Returns:

  • (Boolean)


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

def exist?
  !!menu_item
rescue MenuItemNotFound
  false
end

#selectObject



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

def select
  menu_item.as(:invoke).invoke
end