Class: Watir::Hidden
- Defined in:
- lib/watir-classic/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
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, #drag_contents_to, #label, #maxlength, #requires_typing, #to_s, #value=, #verify_contains
Methods inherited from InputElement
Methods inherited from Element
#<=>, #__ole_inner_elements, #activeObjectHighLightColor, #assert_enabled, #assert_exists, #attribute_value, #click, #click!, #create_event, #disabled?, #dispatch_event, #document, #double_click, #enabled?, #exists?, #fire_event, #flash, #focused?, #initialize, #inspect, #locate, #method_missing, #ole_object, #ole_object=, #parent, #right_click, #send_keys, #style, #tag_name, #text, #to_s, #to_subtype, #type_keys, #typingspeed
Methods included from DragAndDropHelper
#drag_and_drop_by, #drag_and_drop_on
Methods included from Container
#__ole_inner_elements, #alert, #locator_for, #modal_dialog, #set_container, support_element, #wait
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
#append(n) ⇒ Object
override the append method, so that focus isnt set to the hidden object
381 382 383 |
# File 'lib/watir-classic/input_elements.rb', line 381 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
386 387 388 |
# File 'lib/watir-classic/input_elements.rb', line 386 def clear self.value = "" end |
#focus ⇒ Object
this method will do nothing, as you cant set focus to a hidden field
391 392 |
# File 'lib/watir-classic/input_elements.rb', line 391 def focus end |
#set(n) ⇒ Object
set is overriden in this class, as there is no way to set focus to a hidden field
376 377 378 |
# File 'lib/watir-classic/input_elements.rb', line 376 def set(n) self.value = n end |
#visible? ⇒ Boolean
Hidden element is never visible - returns false.
395 396 397 398 |
# File 'lib/watir-classic/input_elements.rb', line 395 def visible? assert_exists false end |