I am using Selenium RC with Junit framework. I am trying to upload a file using attachFile() method.
attachFile: (Information collected from selenium API http:/
"fileLocator" is not an url but a locator as specified at top in the javadoc of the Selenium class. It is the locator of the input used to select a file.
The "fieldLocator" is an url pointing to the file you want to set in the input field of the form, as specified in the doc you are quoting.
With Firefox in chrome mode (browserId=*chrome instead of *firefox), this works as expected. It is documented to be working only with this browserId)
For instance : attachFile("uploadField", Thread.currentThread().getContextClassLoader().getResource("files/sample.pdf").toString());