Class: Watir::RadioCheckCommon
- Inherits:
-
InputElement
- Object
- Element
- InputElement
- Watir::RadioCheckCommon
- Defined in:
- lib/watir/input_elements.rb,
lib/watir/camel_case.rb
Overview
This class contains common methods to both radio buttons and check boxes. Normally a user would not need to create this object as it is returned by the Watir::Container#checkbox or by Watir::Container#radio methods – most of the methods available to this element are inherited from the Element class
Constant Summary
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
- #getState ⇒ Object
-
#initialize(container, how, what, value = nil) ⇒ RadioCheckCommon
constructor
A new instance of RadioCheckCommon.
- #inspect ⇒ Object
- #isSet? ⇒ Object
-
#locate ⇒ Object
:nodoc:.
-
#set? ⇒ Boolean
(also: #checked?)
This method determines if a radio button or check box is set.
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, #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
#initialize(container, how, what, value = nil) ⇒ RadioCheckCommon
Returns a new instance of RadioCheckCommon.
529 530 531 532 |
# File 'lib/watir/input_elements.rb', line 529 def initialize(container, how, what, value=nil) super container, how, what @value = value end |
Instance Method Details
#getState ⇒ Object
50 |
# File 'lib/watir/camel_case.rb', line 50 alias getState set? |
#inspect ⇒ Object
534 535 536 |
# File 'lib/watir/input_elements.rb', line 534 def inspect '#<%s:0x%x located=%s how=%s what=%s value=%s>' % [self.class, hash*2, !!ole_object, @how.inspect, @what.inspect, @value.inspect] end |
#isSet? ⇒ Object
51 |
# File 'lib/watir/camel_case.rb', line 51 alias isSet? set? |
#locate ⇒ Object
:nodoc:
526 527 528 |
# File 'lib/watir/input_elements.rb', line 526 def locate #:nodoc: @o = @container.locate_input_element(@how, @what, self.class::INPUT_TYPES, @value) end |
#set? ⇒ Boolean Also known as: checked?
This method determines if a radio button or check box is set. Returns true if set/checked; false if not set/checked. Raises UnknownObjectException if its unable to locate an object.
541 542 543 544 |
# File 'lib/watir/input_elements.rb', line 541 def set? assert_exists return @o.checked end |