Module: Bewildr::ControlPatterns::SelectionItemPattern

Defined in:
lib/bewildr/control_patterns/selection_item_pattern.rb

Instance Method Summary collapse

Instance Method Details

#selectObject

Selects the element



8
9
10
# File 'lib/bewildr/control_patterns/selection_item_pattern.rb', line 8

def select
  @automation_element.get_current_pattern(System::Windows::Automation::SelectionItemPattern.pattern).select
end

#selected?Boolean

Returns true if the element is selected, false if it’s not

Returns:

  • (Boolean)


13
14
15
# File 'lib/bewildr/control_patterns/selection_item_pattern.rb', line 13

def selected?
  @automation_element.get_current_pattern(System::Windows::Automation::SelectionItemPattern.pattern).current.is_selected
end

#unselected?Boolean

Returns false if the element is selected, true if it’s not

Returns:

  • (Boolean)


18
19
20
# File 'lib/bewildr/control_patterns/selection_item_pattern.rb', line 18

def unselected?
  !selected?
end