Class: Watir::Hidden
- Inherits:
-
TextField
- Object
- Element
- InputElement
- TextField
- Watir::Hidden
- Defined in:
- lib/watir/input_elements.rb
Overview
this class can be used to access hidden field objects Normally a user would not need to create this object as it is returned by the Watir::Container#hidden method
Constant Summary collapse
- INPUT_TYPES =
:stopdoc:
["hidden"]
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
-
#append(n) ⇒ Object
override the append method, so that focus isnt set to the hidden object.
-
#clear ⇒ Object
override the clear method, so that focus isnt set to the hidden object.
-
#focus ⇒ Object
this method will do nothing, as you cant set focus to a hidden field.
-
#set(n) ⇒ Object
set is overriden in this class, as there is no way to set focus to a hidden field.
-
#visible? ⇒ Boolean
Hidden element is never visible - returns false.
Methods inherited from TextField
#abhors_typing, #assert_not_readonly, #dragContentsTo, #drag_contents_to, #maxLength, #maxlength, #requires_typing, #to_s, #value=, #verify_contains
Methods inherited from InputElement
Methods inherited from Element
#<=>, #activeObjectHighLightColor, #after_text, #assert_enabled, #assert_exists, #attribute_value, #before_text, #click, #click!, #document, #enabled?, #exists?, #fire_event, #flash, #initialize, #inspect, #method_missing, #ole_object, #ole_object=, #parent, #text, #to_s, #type_keys, #typingspeed
Methods included from Container
#area, #areas, #button, #buttons, #cell, #cells, #checkbox, #checkboxes, #dds, #divs, #dls, #dts, #element, #element_by_css, #elements, #ems, #file_field, #file_fields, #form, #forms, #frame, #frames, #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::InputElement
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Watir::Element
Instance Method Details
#append(n) ⇒ Object
override the append method, so that focus isnt set to the hidden object
459 460 461 |
# File 'lib/watir/input_elements.rb', line 459 def append(n) self.value = self.value.to_s + n.to_s end |
#clear ⇒ Object
override the clear method, so that focus isnt set to the hidden object
464 465 466 |
# File 'lib/watir/input_elements.rb', line 464 def clear self.value = "" end |
#focus ⇒ Object
this method will do nothing, as you cant set focus to a hidden field
469 470 |
# File 'lib/watir/input_elements.rb', line 469 def focus end |
#set(n) ⇒ Object
set is overriden in this class, as there is no way to set focus to a hidden field
454 455 456 |
# File 'lib/watir/input_elements.rb', line 454 def set(n) self.value = n end |
#visible? ⇒ Boolean
Hidden element is never visible - returns false.
473 474 475 476 |
# File 'lib/watir/input_elements.rb', line 473 def visible? assert_exists false end |