ISelenium AttachFile Method WebDriver
Sets a file input (upload) field to the file listed in fileLocator

Namespace: Selenium
Assembly: ThoughtWorks.Selenium.Core (in ThoughtWorks.Selenium.Core.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

void AttachFile(
	string fieldLocator,
	string fileLocator
)

Parameters

fieldLocator
Type: OnlineSystem String
an element locator
fileLocator
Type: OnlineSystem String
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.
See Also