Class: FireWatir::Hidden
- Inherits:
-
TextField
- Object
- Element
- InputElement
- TextField
- FireWatir::Hidden
- Defined in:
- lib/firewatir/elements/hidden.rb
Overview
Description:
Class for Hidden Field element.
Constant Summary collapse
- INPUT_TYPES =
["hidden"]
Constants inherited from Element
Element::FIRST_ORDERED_NODE_TYPE, Element::NUMBER_TYPE, Element::ORDERED_NODE_ITERATOR_TYPE, Element::TO_S_SIZE
Constants included from Container
Container::DEFAULT_HIGHLIGHT_COLOR, Container::MACHINE_IP
Instance Attribute Summary
Attributes inherited from InputElement
Attributes inherited from Element
Instance Method Summary collapse
-
#append(n) ⇒ Object
Description: Appends the value to the value of the hidden field.
-
#clear ⇒ Object
Description: Clears the value of the hidden field.
-
#focus ⇒ Object
Description: Does nothing, as you cant set focus to a hidden field.
-
#set(n) ⇒ Object
Description: Sets the value of the hidden field.
-
#visible? ⇒ Boolean
Description: Hidden element is never visible - returns false.
Methods inherited from TextField
#assert_not_readonly, #maxlength, #to_s, #verify_contains
Methods inherited from InputElement
Methods inherited from Element
#assert_enabled, #assert_exists, #attribute_value, #click, #contains_text, #disabled, #document_var, #element_by_xpath, #element_type, #elements_by_xpath, #enabled?, #exists?, #fire_event, #initialize, #inspect, #method_missing, #text, #to_s, #wait
Methods included from Container
#button, #cell, #checkbox, #dd, #dl, #dt, #file_field, #form, #frame, #hidden, #image, #link, #radio, #row, #select_list, #show_all_objects, #table, #text_field
Methods included from JsshSocket
#js_eval, #js_eval_method, #jssh_socket, #read_socket
Constructor Details
This class inherits a constructor from FireWatir::InputElement
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class FireWatir::Element
Instance Method Details
#append(n) ⇒ Object
Description:
Appends the value to the value of the hidden field. Overriden in this class, as there is no way to set focus to a hidden field
Input:
n - Value to be appended.
27 28 29 |
# File 'lib/firewatir/elements/hidden.rb', line 27 def append(n) self.value = self.value.to_s + n.to_s end |
#clear ⇒ Object
Description:
Clears the value of the hidden field. Overriden in this class, as there is no way to set focus to a hidden field
35 36 37 |
# File 'lib/firewatir/elements/hidden.rb', line 35 def clear self.value = "" end |
#focus ⇒ Object
Description:
Does nothing, as you cant set focus to a hidden field. Overridden here so that exception doesn't occurs.
43 44 |
# File 'lib/firewatir/elements/hidden.rb', line 43 def focus end |
#set(n) ⇒ Object
Description:
Sets the value of the hidden field. Overriden in this class, as there is no way to set focus to a hidden field
Input:
n - Value to be set.
16 17 18 |
# File 'lib/firewatir/elements/hidden.rb', line 16 def set(n) self.value=n end |
#visible? ⇒ Boolean
Description:
Hidden element is never visible - returns false.
50 51 52 53 |
# File 'lib/firewatir/elements/hidden.rb', line 50 def visible? assert_exists false end |