Description:
Base class for checkbox and radio button elements.
Description:
Initializes the instance of element object. Element can be checkbox or radio button.
Input:
- how - Attribute to identify the element. - what - Value of that attribute. - value - value of the element.
# File lib/firewatir/elements/radio_check_common.rb, line 17 def initialize(container, how, what, value = nil) @how = how @what = what @value = value @container = container end
Description:
Unchecks the radio button or check box element. Raises ObjectDisabledException exception if element is disabled.
# File lib/firewatir/elements/radio_check_common.rb, line 60 def clear assert_exists assert_enabled #highlight(:set) set_clear_item(false) #highlight(:clear) end
Description:
Locate the element on the page. Element can be a checkbox or radio button.
# File lib/firewatir/elements/radio_check_common.rb, line 28 def locate case @how when :jssh_name @element_name = @what when :xpath @element_name = element_by_xpath(@container, @what) else @element_name = locate_tagged_element("input", @how, @what, @type, @value) end @o = self end
Description:
Checks the radio button or check box element. Raises ObjectDisabledException exception if element is disabled.
# File lib/firewatir/elements/radio_check_common.rb, line 73 def set assert_exists assert_enabled #highlight(:set) set_clear_item(true) #highlight(:clear) end
Description:
Checks if element i.e. radio button or check box is checked or not.
Output:
True if element is checked, false otherwise.
# File lib/firewatir/elements/radio_check_common.rb, line 47 def set? assert_exists return @o.checked end