class Mohawk::Adapters::UIA::ComboBoxControl

Public Instance Methods

options() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 20
def options
  if supports_selection?
    all_items.map &:name
  else
    element.items.map &:name
  end
end
value() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 12
def value
  if supports_selection?
    selection_pattern.selected_items.map(&:name).first || ''
  else
    value_pattern.value
  end
end

Private Instance Methods

all_items() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 30
def all_items
  selection_pattern.selection_items
end
click_or_select(item) click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 34
def click_or_select(item)
  item.click
rescue
  item.select
end
ctrl_element()
Alias for: element
element() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 52
def element
  ctrl_element.with(:combo_box)
end
Also aliased as: ctrl_element
selection_pattern() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 40
def selection_pattern
  element.as :selection
end
supports_selection?() click to toggle source
# File lib/mohawk/adapters/uia/combo_box.rb, line 44
def supports_selection?
  selection_pattern
  true
rescue
  false
end