Class: Selenium::WebDriver::Elements::Checkbox
- Defined in:
- lib/selenium/webdriver/elements/checkbox.rb
Instance Method Summary collapse
Methods inherited from Element
#create_element, #element_present?, #find_element, #find_elements, #initialize, #method_missing
Constructor Details
This class inherits a constructor from Selenium::WebDriver::Elements::Element
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Selenium::WebDriver::Elements::Element
Instance Method Details
#check(state = 'on') ⇒ Object
9 10 11 12 13 |
# File 'lib/selenium/webdriver/elements/checkbox.rb', line 9 def check state = 'on' if @element.selected? != state @element.toggle end end |
#populate(data) ⇒ Object
19 20 21 22 23 |
# File 'lib/selenium/webdriver/elements/checkbox.rb', line 19 def populate data if data != nil check data end end |
#uncheck ⇒ Object
15 16 17 |
# File 'lib/selenium/webdriver/elements/checkbox.rb', line 15 def uncheck check 'off' end |