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
  • 5,233
  • 8
  • 50
  • 81

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,384
  • 1
  • 16
  • 39