We need to test that when the download button is clicked,
- The expected file (Template.xlsx) is downloaded and is available in download folder ("c:/user/downloads/").
- The file size is matching the expected size
- Also before I download I have to delete the existing files from download folder so that copy of same file doesn't occur
We are using Nightwatch.js for test automation. I have seen some examples ( e.g. File Upload Testing in Nightwatch.js or Testing download links with Nightwatch.js or Validating download file in Nightwatch) but could not figure out a working solution for my problem.
I understand that this question is a duplicate of (Validating download file in Nightwatch), but no working solution was offered there either. so I am raising the question again.
Any ideas, please?