Class: Watir::Radio
- Inherits:
-
RadioCheckCommon
- Object
- Element
- InputElement
- RadioCheckCommon
- Watir::Radio
- Defined in:
- lib/watir/input_elements.rb
Overview
–
this class makes the docs better
++ This class is the watir representation of a radio button. Normally a user would not need to create this object as it is returned by the Watir::Container#radio method
Constant Summary collapse
- INPUT_TYPES =
["radio"]
Constants inherited from Element
Instance Attribute Summary
Attributes inherited from Element
Attributes included from Container
#activeObjectHighLightColor, #page_container, #type_keys, #typingspeed
Instance Method Summary collapse
-
#clear ⇒ Object
This method clears a radio button.
-
#set ⇒ Object
This method sets the radio list item.
Methods inherited from RadioCheckCommon
#getState, #initialize, #inspect, #isSet?, #locate, #set?
Methods inherited from InputElement
Methods inherited from Element
#<=>, #activeObjectHighLightColor, #after_text, #assert_enabled, #assert_exists, #attribute_value, #before_text, #click, #click!, #click_no_wait, #document, #enabled?, #exists?, #fire_event, #flash, #focus, #initialize, #inspect, #ole_object, #ole_object=, #parent, #text, #to_s, #type_keys, #typingspeed, #visible?
Methods included from Container
#area, #areas, #button, #buttons, #cell, #cells, #checkbox, #checkboxes, #dds, #divs, #dls, #dts, #element, #elements, #ems, #file_field, #file_fields, #form, #forms, #frame, #hidden, #hiddens, #image, #images, #labels, #link, #links, #lis, #locate_all_elements, #locate_input_element, #locate_tagged_element, #log, #map, #maps, #modal_dialog, #popup, #pres, #ps, #radio, #radios, #row, #rows, #select_list, #select_lists, #set_container, #show_all_objects, #spans, #strongs, #table, #tables, #text_field, #text_fields, #wait
Constructor Details
This class inherits a constructor from Watir::RadioCheckCommon
Instance Method Details
#clear ⇒ Object
This method clears a radio button. One of them will almost always be set. Returns true if set or false if not set.
Raises UnknownObjectException if its unable to locate an object
ObjectDisabledException IF THE OBJECT IS DISABLED
568 569 570 571 572 573 |
# File 'lib/watir/input_elements.rb', line 568 def clear assert_enabled highlight(:set) set_clear_item(false) highlight(:clear) end |
#set ⇒ Object
This method sets the radio list item.
Raises UnknownObjectException if it's unable to locate an object
ObjectDisabledException if the object is disabled
578 579 580 581 582 583 584 |
# File 'lib/watir/input_elements.rb', line 578 def set assert_enabled highlight(:set) @o.scrollIntoView set_clear_item(true) highlight(:clear) end |