Adds files to form using debugger
Require the library:
require('nightmare-upload')
then use .upload(selector, path) action
Adds file to selector
input.
require('nightmare-upload');
var nightmare = Nightmare();
yield nightmare
.upload('#single-file-input', path.join(__dirname, '1.txt'))
.evaluate(function () {
return document.querySelector('#single-file-input').files.length;
});