Uploading files if input has no name property set?

Skip to first unread message

Angel Petrov

Feb 9, 2016, 11:53:06 AM2/9/16
to Geb Development Mailing List

I am new to geb, and while testing out the upload file functionality, I noticed that it heavily relies on the "name" of the input.
Is there any way to upload a file if the input has no name set?


Benjamin Hofmann

Feb 10, 2016, 4:42:08 AM2/10/16
to geb...@googlegroups.com

you are not required to use the name property as identifier in a form. If your navigator object is an input with type file you can simply use that, eg:

$('input[type=file]) = uploadedFile.absolutePath

I actually dont know why they dont indicate this in the manual.


Benjamin Hofmann
QA Automation Engineer

Jumio Inc.
Stättermayergasse 28
1150 Wien

Phone: 06641047789
Skype: xellsys
E-mail: benjamin...@jumio.com

Website Blog Facebook Twitter

You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+u...@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/7eb53b42-9778-47cc-af78-35de202f7890%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Angel Petrov

Feb 10, 2016, 6:27:46 AM2/10/16
to geb...@googlegroups.com
Thank you for the reply,

I found out you can pass the absolute path to the value of the input for eg:
         $('input',type:'File').value = uploadedFile.absolutePath;

This should certainly be added to the manual.

Marcin Erdmann

Feb 10, 2016, 7:45:50 AM2/10/16
to geb...@googlegroups.com

Contributions to the manual are always welcome. And the contributor list is not limited to code contributors which means that you would still get included on in it.

Also, in the future please direct usage questions like this one to the user mailing list at https://groups.google.com/d/forum/geb-user. This is a development list which is not followed by most users and your question and the answer might be useful for somebody on the user mailing list.


Angel Petrov

Feb 10, 2016, 11:11:13 AM2/10/16
to geb...@googlegroups.com
Is there any way to create a duplicate of this question in   https://groups.google.com/d/forum/geb-user, to make this available for them as well?

Marcin Erdmann

Feb 10, 2016, 11:42:37 AM2/10/16
to geb...@googlegroups.com
As far as I know, the only way would be to forward the message to geb-...@googlegroups.com with a disclaimer at the top.

Reply all
Reply to author
0 new messages