Module: WatirRobot::FileField
- Included in:
- KeywordLibrary
- Defined in:
- lib/watir_robot/keywords/file_field.rb
Overview
Functionality for HTML file-upload fields
Instance Method Summary collapse
-
#choose_file(loc, path) ⇒ Object
Insert path of a file into a file-upload field.
-
#get_filefield_path(loc) ⇒ Object
Get the file path present in a file-upload field.
Instance Method Details
#choose_file(loc, path) ⇒ Object
Insert path of a file into a file-upload field
16 17 18 |
# File 'lib/watir_robot/keywords/file_field.rb', line 16 def choose_file(loc, path) @browser.file_field(parse_location(loc)).set path end |
#get_filefield_path(loc) ⇒ Object
Get the file path present in a file-upload field
26 27 28 |
# File 'lib/watir_robot/keywords/file_field.rb', line 26 def get_filefield_path(loc) @browser.file_field(parse_location(loc)).value end |