tags:

views:

26

answers:

2

So I know I can add a filepath to a file element type using Watir, but is it possible to open up the file explorer to select a file to upload? Or is the only way to just enter the path using .file_fields?

+1  A: 

What is the problem? What do you want to do?

This will open file upload popup and select a file:

browser.file_field(:id, "the_file").set("C:\\image.png")

More information: File Uploads

Željko Filipin