I'm currently working on a big project at Intracto where they want a lot of fancy visuals and this turned into a mess when it came to write behat tests. This post will help you test fancy buttons that trigger a hidden file input field to upload something.
The upload button is there but the input field is hidden meaning that if you use the default function from the MinkContext that it will cry out saying the "Element is not currently visible and so may not be interacted with". Since we really want this tested I made a hack to solve our issue.
STEP 1: Create a custom context extending or including MinkContext
More info can be found http://docs.behat.org/en/latest/guides/4.contexts.html
STEP 2: Create your custom action
STEP 3: Attach a file to it
Given I attach the file "picture.png" to hidden field "upload-file"
STEP 4: Benefit