def checkbox(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'checkbox_for', &block)
      define_method("check_#{name}") do
        return platform.check_checkbox(identifier.clone) unless block_given?
        self.send("#{name}_element").check
      end
      define_method("uncheck_#{name}") do
        return platform.uncheck_checkbox(identifier.clone) unless block_given?
        self.send("#{name}_element").uncheck
      end
      define_method("#{name}_checked?") do
        return platform.checkbox_checked?(identifier.clone) unless block_given?
        self.send("#{name}_element").checked?
      end
    end
def checkbox(name, identifier={:index => 0}, &block)
      standard_methods(name, identifier, 'checkbox_for', &block)
      define_method("check_#{name}") do
        return platform.check_checkbox(identifier.clone) unless block_given?
        self.send("#{name}_element").check
      end
      define_method("uncheck_#{name}") do
        return platform.uncheck_checkbox(identifier.clone) unless block_given?
        self.send("#{name}_element").uncheck
      end
      define_method("#{name}_checked?") do
        return platform.checkbox_checked?(identifier.clone) unless block_given?
        self.send("#{name}_element").checked?
      end
    end
adds five methods - one to check, another to uncheck, another
 to return the state of a checkbox, another to return
 a PageObject::Elements::CheckBox object representing the checkbox, and
 a final method to check the checkbox's existence.

 @example
   checkbox(:active, :name => "is_active")
   # will generate 'check_active', 'uncheck_active', 'active_checked?',
   # 'active_element', and 'active?' methods

 @param [Symbol] the name used for the generated methods
 @param [Hash] identifier how we find a checkbox.
 @param optional block to be invoked when element method is called