Even file upload user widgets use an element <input type="file" ...>under their user interface. This is necessary to access files on the client machine.
You can bypass the widget interface by directly setting the file you want to download. Since CasperJS is built on top of PhantomJS, you can use all the features of PhantomJS, including page.uploadFile(selector, filename). In your case, it will look something like this:
casper.page.uploadFile("#uploaders input[type='file']", myfilename);
Please note that it is also possible to use everything casper.fill*()provided that you know the name of the file input element in advance and the file input field inside the form element.
source
share