0

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?

Kirk Ross
  • 6,413
  • 13
  • 61
  • 104

1 Answers1

1

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'))

catch22
  • 1,564
  • 1
  • 18
  • 41