I am having trouble figuring out a way to test image upload with Nightwatch. Once I click('.image-upload-button') I am outside the browser into the OS and seem to have no control.
What is the best approach for this?
Add const path = require('path');
at the top of your file.
You need .setValue
, as second argument introduce the path to the file in your SO. That will make it.
.setValue('.selector', path.resolve('path/to/file.jpg'))