Class: Celerity::RadioCheckCommon
- Inherits:
-
InputElement
- Object
- Element
- InputElement
- Celerity::RadioCheckCommon
- Defined in:
- lib/celerity/elements/radio_check.rb,
lib/celerity/watir_compatibility.rb
Overview
Common superclass for radios and check boxes.
Constant Summary collapse
- DEFAULT_HOW =
:name
Constants inherited from InputElement
Constants inherited from Element
Element::ATTRIBUTES, Element::BASE_ATTRIBUTES, Element::CELLHALIGN_ATTRIBUTES, Element::CELLVALIGN_ATTRIBUTES, Element::HTML_401_TRANSITIONAL, Element::TAGS, Element::TO_S_SIZE
Instance Attribute Summary
Attributes inherited from Element
Attributes included from Container
Instance Method Summary collapse
-
#clear ⇒ Object
Unset this element.
- #get_state ⇒ Object
- #getState ⇒ Object
-
#initialize(container, type, *args) ⇒ RadioCheckCommon
constructor
Can optionally take a value parameter as a third arg, so we override initialize.
- #is_set? ⇒ Object
- #isSet? ⇒ Object
-
#set? ⇒ true, false
(also: #checked?)
returns true if the element is checked.
Methods inherited from InputElement
Methods included from DisabledElement
#assert_enabled, #disabled?, #enabled?
Methods included from ClickableElement
#click, #click_and_attach, #double_click, #download, #right_click
Methods inherited from Element
#assert_exists, #attribute_string, #attribute_value, #exists?, #fire_event, #focus, #javascript_object, #locate, #method_missing, #methods, #object, #parent, #respond_to?, #text, #to_s, #to_xml, #visible?, #xpath
Methods included from Container
#area, #areas, #button, #buttons, #cell, #cells, #check_box, #checkboxes, #container=, #contains_text, #dd, #dds, #div, #divs, #dl, #dls, #dt, #dts, #em, #ems, #file_field, #file_fields, #form, #forms, #frame, #frames, #h1, #h1s, #h2, #h2s, #h3, #h3s, #h4, #h4s, #h5, #h5s, #h6, #h6s, #hidden, #hiddens, #image, #images, #inspect, #label, #labels, #li, #link, #links, #lis, #map, #maps, #meta, #metas, #ol, #ols, #option, #p, #pre, #pres, #ps, #radio, #radios, #row, #rows, #select_list, #select_lists, #span, #spans, #strong, #strongs, #table, #tables, #tbodies, #tbody, #text_field, #text_fields, #tfoot, #tfoots, #th, #thead, #theads, #ths, #ul, #uls, #update_page
Methods included from ShortInspect
Constructor Details
#initialize(container, type, *args) ⇒ RadioCheckCommon
Can optionally take a value parameter as a third arg, so we override initialize
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/celerity/elements/radio_check.rb', line 14 def initialize(container, type, *args) @type = type case args.size when 2 super(container, args[0] => args[1]) when 3 super(container, args[0] => args[1], :value => args[2]) else super(container, *args) end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Celerity::Element
Instance Method Details
#clear ⇒ Object
Unset this element.
41 42 43 |
# File 'lib/celerity/elements/radio_check.rb', line 41 def clear set(false) end |
#get_state ⇒ Object
61 |
# File 'lib/celerity/watir_compatibility.rb', line 61 alias_method :get_state, :set? |
#getState ⇒ Object
63 |
# File 'lib/celerity/watir_compatibility.rb', line 63 alias_method :getState, :set? |
#is_set? ⇒ Object
60 |
# File 'lib/celerity/watir_compatibility.rb', line 60 alias_method :is_set?, :set? |
#isSet? ⇒ Object
62 |
# File 'lib/celerity/watir_compatibility.rb', line 62 alias_method :isSet?, :set? |
#set? ⇒ true, false Also known as: checked?
returns true if the element is checked
31 32 33 34 |
# File 'lib/celerity/elements/radio_check.rb', line 31 def set? assert_exists @object.isChecked end |