I'm attempting to upload a file, which it does, however the upload screen just stays open so I cannot view on half the screen. Anyone know a workaround? The code I use:
var path = require('path');
//the file to upload
var fileToUpload = 'some path i put in',
//this is variable that inserts the path to find file to upload
absolutePath = path.resolve(__dirname, fileToUpload);
//inserts the path
$('input[type="file"]').sendKeys(absolutePath);
I've tried adding: $('#uploadButton').click(); however it throws errors.
This question is related to my previous questions here: Are you able to upload a file
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire