Uploading a file using FirefoxDriver Webdriver

12 views
Skip to first unread message

SAI ROSHAN

unread,
Jul 19, 2011, 3:08:54 AM7/19/11
to SeleniumWiki
Hi all,
I am simulating the file upload in my application using FirefoxDriver,

i have this file input box:

<input id="file" type="file" size="27" value="Attach document"
onclick="javascript:return processAttachment();" name="file">


and tried this code:

driver.findElementByName("file").sendKeys("E:/plus.GIF");

driver.findElementByName("file").click();

But its not working....

Please help me out in this...

Thanks sai




Pavandeep Puddupakkam

unread,
Jul 25, 2011, 8:15:36 AM7/25/11
to SeleniumWiki
Reply all
Reply to author
Forward
0 new messages