Module: Bewildr::ControlPatterns::SelectionItemPattern
- Defined in:
- lib/bewildr/control_patterns/selection_item_pattern.rb
Instance Method Summary collapse
-
#select ⇒ Object
Selects the element.
-
#selected? ⇒ Boolean
Returns true if the element is selected, false if it’s not.
-
#unselected? ⇒ Boolean
Returns false if the element is selected, true if it’s not.
Instance Method Details
#select ⇒ Object
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
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
18 19 20 |
# File 'lib/bewildr/control_patterns/selection_item_pattern.rb', line 18 def unselected? !selected? end |