Method: Selenium::Client::GeneratedDriver#attach_file
- Defined in:
- lib/selenium/client/legacy_driver.rb
#attach_file(fieldLocator, fileLocator) ⇒ Object
Sets a file input (upload) field to the file listed in fileLocator
‘fieldLocator’ is an element locator ‘fileLocator’ is a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox (“*chrome”) only.
1631 1632 1633 |
# File 'lib/selenium/client/legacy_driver.rb', line 1631 def attach_file(fieldLocator,fileLocator) remote_control_command("attachFile", [fieldLocator,fileLocator,]) end |