Class: Watir::FileField
- Inherits:
-
Input
- Object
- BaseElement
- HTMLElement
- Input
- Watir::FileField
- Defined in:
- lib/watir-webdriver/elements/file_field.rb
Constant Summary
Constants inherited from BaseElement
BaseElement::IGNORED_ATTRIBUTES
Instance Method Summary collapse
-
#set(value) ⇒ Object
Set the file field to the given path.
-
#value ⇒ String
Return the value of this field.
Methods inherited from Input
#enabled?, #to_button, #to_checkbox, #to_radio, #to_select_list, #type
Methods inherited from BaseElement
attribute_list, #attribute_value, attributes, #click, #double_click, #driver, #element, #exists?, #fire_event, #flash, #focus, #html, #initialize, #inspect, #parent, #right_click, #run_checkers, #send_keys, #style, #tag_name, #text, typed_attributes, #visible?
Methods included from Container
Methods included from XpathSupport
#element_by_xpath, #elements_by_xpath
Constructor Details
This class inherits a constructor from Watir::BaseElement
Instance Method Details
#set(value) ⇒ Object
Set the file field to the given path
15 16 17 18 |
# File 'lib/watir-webdriver/elements/file_field.rb', line 15 def set(value) assert_exists @element.send_keys value end |
#value ⇒ String
Return the value of this field
26 27 28 29 30 |
# File 'lib/watir-webdriver/elements/file_field.rb', line 26 def value # since 'value' is an attribute on input fields, we override this here assert_exists @element.value end |