Class: Mohawk::Adapters::UIA::CheckBox

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

Instance Method Summary collapse

Methods inherited from Control

#click, #disabled?, #element, #enabled?, #exist?, #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

#checked?Boolean

Returns:

  • (Boolean)


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

def checked?
  toggle.toggle_state == :on
end

#set_check(should_check) ⇒ Object



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

def set_check(should_check)
  toggle.toggle_state = should_check ? :on : :off
end