Skip to content

Instantly share code, notes, and snippets.

@johnnncodes
Forked from thekarel/upload.js
Last active August 29, 2015 14:10
Show Gist options
  • Save johnnncodes/c8008af13edb93a2f21c to your computer and use it in GitHub Desktop.
Save johnnncodes/c8008af13edb93a2f21c to your computer and use it in GitHub Desktop.
var util = require('util');
it('should upload file', function() {
var fileToUpload = '../some/path/foo.txt';
var absolutePath = path.resolve(__dirname, fileToUpload);
$('input[type="file"]').sendKeys(absolutePath);
$('#uploadButton').click();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment