It just takes 15 seconds. Send your
details and we’ll get back to you soon.

Grails Functional Testing: Uploading a file using G-Func plugin

At Intelligrape we face many challenges while developing web-applications. One of the small challenge was to test the web pages that contains file input field <input type=”File”>(to upload files). After few hours drilling with Canoo webtest plugin I decided to use the new fabulous plugin, Grails functional Testing by Marc Palmer (

The syntax for setting value for the file input field is


Let me explain you with an example:
Following component’s HTML is

<input name="FileInputField" type="file" />

The name of the file input field is FileInputField.The code for setting value/path will be


any kind of suggestions and comments are welcome……

Chandan Luthra

One Response to Grails Functional Testing: Uploading a file using G-Func plugin

  1. Uday says:

    I was trying the method explained by Marc Parmer here but it didn’t work out for me.
    But the method expained by you really works

    Thanks Chandan

Leave a Reply

Your email address will not be published. Required fields are marked *

7 + 1 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>