1

I need to test a file download and assert that contents of the file are valid.

Tests are written in plain JS and testing tool doesn't matter. I have tried puppeteer, testcafe, cypress and even good old selenium with phantomJS but I am unable to get it done.

I am sure this is a very common use-case and someone out there in the wild should have already done it.

Point me to the right direction please.

Waku-2
  • 1,136
  • 2
  • 13
  • 26
  • First of all: what is your main issue? I suppose that you're ok with a testing framework of your choice... but aren't you able to download the file or to open and check it? Here you can find a working download solution and then reading and checking the file should be very easy https://stackoverflow.com/questions/49245080/how-to-download-file-with-puppeteer-using-headless-true If you can try to describe better your flow and where you're stuck Stefano – NoriSte Sep 12 '18 at 14:12

0 Answers0