[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 posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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
>
>
>
>
> --
> *From:* "jherz...@shastaqa.com "  >
> *To:* Watir General > 
> *Cc:* jfit...@yahoo.com 
> *Sent:* Friday, May 13, 2016 10:39 AM
> *Subject:* Re: [wtr-general] Upload multiple files to input element?
>
> It's just a standard input field 
> ``` 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:* "jherz...@shastaqa.com" 
> *To:* Watir General  
> *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.
>  
> watir-...@googlegroups.com
> http://groups.google.com/ group/watir-general 
> 
> watir-genera...@ googlegroups.com
>
> --- 
> 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 watir-genera...@ googlegroups.com.
>
> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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":
>
> 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, jherz...@shastaqa.com 
>  wrote:
>>
>> It's just a standard input field 
>> ```> 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:* "jherz...@shastaqa.com" 
>>> *To:* Watir General  
>>> *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.
>>>  
>>> watir-...@googlegroups.com
>>> http://groups.google.com/group/watir-general
>>> watir-genera...@googlegroups.com
>>>
>>> --- 
>>> 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 watir-genera...@googlegroups.com.
>>> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 at 1:41:16 PM UTC-4, jherzen...@shastaqa.com wrote:
>
> It's just a standard input field 
> ``` 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:* "jherz...@shastaqa.com" 
>> *To:* Watir General  
>> *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.
>>  
>> watir-...@googlegroups.com
>> http://groups.google.com/group/watir-general
>> watir-genera...@googlegroups.com
>>
>> --- 
>> 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 watir-genera...@googlegroups.com.
>> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/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:* "jherz...@shastaqa.com "  >
> *To:* Watir General > 
> *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.
>  
> watir-...@googlegroups.com 
> http://groups.google.com/group/watir-general
> watir-genera...@googlegroups.com 
>
> --- 
> 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 watir-genera...@googlegroups.com .
> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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



  From: "jherzen...@shastaqa.com" 
 To: Watir General  
Cc: jfitis...@yahoo.com
 Sent: Friday, May 13, 2016 10:39 AM
 Subject: Re: [wtr-general] Upload multiple files to input element?
   
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/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: "jherz...@shastaqa.com" 
 To: Watir General  
 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.
 
watir-...@googlegroups.com
http://groups.google.com/ group/watir-general
watir-genera...@ googlegroups.com

--- 
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 watir-genera...@ googlegroups.com.
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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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: [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.
 
watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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.
>
> watir-general@googlegroups.com
> 
> http://groups.google.com/group/watir-general
> watir-general+unsubscr...@googlegroups.com
> 
>
> ---
> 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 watir-general+unsubscr...@googlegroups.com
> 
> .
> 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.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
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 watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.