Last time I checked, Webdriver did not have full support for uploading 
multiple files.

For at least Chrome, a workaround was to use `send_keys` and deliminate the 
files using "\n":

browser.file_field.send_keys("full/path/file1.txt \n full/path/file2.txt")

- Justin Ko


On Friday, May 13, 2016 at 1:41:16 PM UTC-4, [email protected] wrote:
>
> It's just a standard input field 
> ```<input name="files[]" type="file" accept="application/json" id="files" 
> multiple="multiple">```
>
> It accepts multiple, I'm just not sure how to do that...
> I've tried using `input_element.set paths` with the 'paths' variable as 
> the following:
> ```
> paths = ("/path/to/file/1"; "/path/to/file/2")
> paths = ["/path/to/file/1", "/path/to/file/2"]
> paths = "'path/to/file/1', 'path/to/file/2'"
> ```
>
> On Friday, May 13, 2016 at 6:58:33 AM UTC-7, johnssn wrote:
>>
>> Hi Jesse,
>>
>> What have you tried, what does the HTML look like and what kind of errors 
>> are you getting? It could be many things and that info might narrow down 
>> the possibilities a bit.
>>
>> John
>>
>> ------------------------------
>> *From:* "[email protected]" <[email protected]>
>> *To:* Watir General <[email protected]> 
>> *Sent:* Thursday, May 12, 2016 7:36 PM
>> *Subject:* [wtr-general] Upload multiple files to input element?
>>
>> Hello everyone
>>
>> I'm having a bit of difficulty trying to automate something that is a 
>> fairly standard procedure.  There is an input element on the page, that 
>> accepts multiple, and I need to upload multiple files to this.  I haven't 
>> been able to find anything on any of the major forums, so I figured I'd 
>> post here and see if any of you know of a solution.  Thanks!
>>
>> Cheers,
>> Jesse
>> -- 
>> -- 
>> 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]
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>

-- 
-- 
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]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to