Uploads with Nightmare
August 30, 2016 ยท View on GitHub
When presented with a <input type='file'>, being able to add files would be useful, either directly or by overriding the file selection dialog (like will-download).
Solution
Use the nightmare-upload plugin.
References
- Nightmare #235 - Asked after Nightmare v2.x was released and uploads were removed.
- Nightmare #466 - How to do uploads similarly to selenium.
- Electron #749 - Feature request to add files to
<input type='file'>elements. - Electron #3499 - Feature request to override
file-uploaddialog.