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

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

Chandan Luthra

I am an Open Source Enthusiast...A great lover of Java Technologies. Apart from server side coding and configurations, I love to optimize applications on the client side (browser) as well. I also co-authored a book on Firebug. I am a software developer by profession and Heart. I Love to code using Groovy and Grails with JQuery sauce on it to beautify an app ;)

One thought on “Grails Functional Testing: Uploading a file using G-Func plugin

Leave a Reply

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

Uday Pratap SinghMansi AroraAnuj Aneja
Subscribe to our Blog

Get latest articles straight to your inbox. Enter your email address below: