class FireWatir::CheckBox

Description: Class for Checkbox element.

Public Class Methods

new(*args) click to toggle source
# File lib/firewatir/elements/radio_check_common.rb, line 118
def initialize *args
  super
  @type = ["checkbox"]
end

Public Instance Methods

clear() click to toggle source

Description:

Unchecks the checkbox.
Raises ObjectDisabledException exception if the object is disabled
# File lib/firewatir/elements/radio_check_common.rb, line 152
def clear
  assert_exists
  assert_enabled
  highlight( :set)
  if @o.checked == true
    set_clear_item( false )
  end
  highlight( :clear)
end
set( set_or_clear=true ) click to toggle source

Description:

Checks or unchecks the checkbox. If no value is supplied it will check the checkbox.
Raises ObjectDisabledException exception if the object is disabled

Input:

- set_or_clear - Parameter indicated whether to check or uncheck the checkbox.
                 True to check the check box, false for unchecking the checkbox.
# File lib/firewatir/elements/radio_check_common.rb, line 132
def set( set_or_clear=true )
  assert_exists
  assert_enabled
  highlight(:set)

  if set_or_clear == true
    if @o.checked == false
      set_clear_item( true )
    end
  else
    self.clear
  end
  highlight(:clear )
end