benishky
benishky

Reputation: 981

How to assert Download has been started or completed in Nightwatch (w/ Saucelabs)

I have an app that creates a .csv on-the-fly when clicking a button. I need to assert that the download has at least started.
I found some examples of a download sitting on the server and being able to assert a 200 response from the server. How would I do this in my case, where nothing is sitting on the server? I can see in saucelabs that it has been downloaded in the screen capture.

Upvotes: 1

Views: 223

Answers (1)

Dmytro Shtanko
Dmytro Shtanko

Reputation: 51

you can use request module. npm install request

Very easy and quick doing of actions like yours.

Upvotes: 0

Related Questions