Module: Cello::PageObjects::CheckboxHelper

Included in:
ElementHelper
Defined in:
lib/cello/pageobjects/html_elements/checkbox_helper.rb

Instance Method Summary collapse

Instance Method Details

#define_extras_for_checkbox(name) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/cello/pageobjects/html_elements/checkbox_helper.rb', line 4

def define_extras_for_checkbox(name)
  define_method "#{name}_check" do
    send(name).set
  end
  define_method "#{name}_uncheck" do
    send(name).clear
  end
  define_method "#{name}_is_checked?" do
    send(name).set?
  end
  define_method "#{name}_is_unchecked?" do
    !(send(name).set?)
  end
end