You'll want to be looking for an element like this:

<input type="file" name="fileUpload">

Then you would do something like this:
$ie.file_field(:name, "fileUpload").set("your file.txt")

On Thursday, August 2, 2012 9:41:35 AM UTC-4, mani racha wrote:
>
>
> Hi all,
> I'm trying to upload a file in a webpage with watir.
> After so much of work,I've founded the link 
> http://wiki.openqa.org/display/WTR/File+Uploads .
> but it didn't work for me.
>
> ie.button(:name, "file_upload_button").click_no_wait
> ie.send_keys("c:\test.txt")
> ie.send_keys("{ENTER}") 
>
> $ie.file_field(:name, "").set("your file.txt")
>
> I've tried with above 2 suggested snippets.(What is the file_field 
> exactly???)
> But neither of them given result.
> Any one help me out plzz??
>  
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to