[wtr-general] Re: Upload multiple files to input element?

2016-05-13 Thread jherzenach
So I'm thinking I may have to do something with Javascript (shudders). Going to try patching together a script and passing it to the execute_script function. Maybe from that side it will be possible? Will post back if I have any luck, as maybe this will be useful to someone. -- -- Before p

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread jherzenach
The problem with this approach is that the 'set' call sets the value to that path. It erases any previous changes made, it doesn't append to it. On Friday, May 13, 2016 at 10:48:05 AM UTC-7, johnssn wrote: > > Maybe something like this. First thing to try, anyway. Method may take > multiple fil

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread jherzenach
This didn't seem to work for me On Friday, May 13, 2016 at 10:54:56 AM UTC-7, Justin Ko wrote: > > 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": > > brow

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread Justin Ko
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

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread jherzenach
It's just a standard input field `` 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

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread 'John Fitisoff' via Watir General
Maybe something like this. First thing to try, anyway. Method may take multiple file args, can't remember offhand  # http://www.rubydoc.info/gems/watir-webdriver/Watir/FileField × ['path/one.txt', 'path/two.txt'].each do |path|  b.file_field(:id, 'some_id').when_present.set(path)end Fr

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread 'John Fitisoff' via Watir General
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: "jherzen...@shastaqa.com" To: Watir General Sent: Thursday, May 12, 2016 7:36 PM Subject: [

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread Sharma Vishav
Hi Can you point to your example code ? Thanks Vish On Friday, 13 May 2016, wrote: > 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 multipl