Class: Watir::CheckBox
- Inherits:
-
InputElement
- Object
- Element
- InputElement
- Watir::CheckBox
- Includes:
- RadioCheckCommon
- Defined in:
- lib/watir-classic/input_elements.rb
Overview
Returned by the Watir::Container#checkbox method.
Instance Attribute Summary
Attributes inherited from Element
Attributes included from Container
Instance Method Summary collapse
-
#clear ⇒ Object
Clear the checkbox.
-
#set(value = true) ⇒ Object
Check or clear the checkbox.
Methods included from RadioCheckCommon
Methods inherited from InputElement
#alt, #disabled?, #label, #name, #required?, #src, #type, #value
Methods inherited from Element
#<=>, #attribute_value, #class_name, #click, #disabled?, #double_click, #enabled?, #exists?, #fire_event, #flash, #focus, #focused?, #id, #initialize, #inner_html, #inspect, #method_missing, #ole_object, #outer_html, #parent, #right_click, #send_keys, #style, #tag_name, #text, #title, #to_s, #to_subtype, #unique_number, #visible?
Methods included from DragAndDropHelper
#drag_and_drop_by, #drag_and_drop_on
Methods included from Container
#a, #abbr, #address, #alert, #area, #article, #aside, #audio, #b, #base, #bdi, #bdo, #blockquote, #body, #br, #button, #canvas, #caption, #checkbox, #cite, #code, #col, #colgroup, #command, #data, #datalist, #dd, #del, #details, #dfn, #div, #dl, #dt, #element, #em, #embed, #fieldset, #figcaption, #figure, #file_field, #font, #footer, #form, #frame, #frameset, #h1, #h2, #h3, #h4, #h5, #h6, #head, #header, #hgroup, #hidden, #hr, #i, #img, #input, #ins, #kbd, #keygen, #label, #legend, #li, #map, #mark, #menu, #meta, #meter, #modal_dialog, #nav, #noscript, #object, #ol, #optgroup, #option, #output, #p, #param, #pre, #progress, #q, #radio, #rp, #rt, #ruby, #s, #samp, #script, #section, #select, #small, #source, #span, #strong, #style, #sub, #summary, #sup, #table, #tbody, #td, #text_field, #textarea, #tfoot, #th, #thead, #time, #title, #tr, #track, #u, #ul, #var, #video, #wbr
Methods included from Exception
Methods included from ElementExtensions
#present?, #wait_until_present, #wait_while_present, #when_present
Constructor Details
This class inherits a constructor from Watir::Element
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Watir::Element
Instance Method Details
#clear ⇒ Object
Clear the checkbox.
486 487 488 |
# File 'lib/watir-classic/input_elements.rb', line 486 def clear set false end |
#set(value = true) ⇒ Object
Check or clear the checkbox.
476 477 478 479 480 481 |
# File 'lib/watir-classic/input_elements.rb', line 476 def set(value=true) perform_action do current_value = @o.checked click unless value == current_value end end |