File Download Steps

Capture and assert file downloads. Filename, mime, path. Useful for export and reporting features Product cares about.

Step phrasings in this group

The book sidebar lists each individual step page under this group.

When I download the file from the URL "/exports/users.csv"

Download the file at a URL using the browser's request context. The result

When I download the file from the link "Download report"

Click a link by visible text and capture the resulting download.

Then the downloaded file should contain:

Assert the most recent download's body contains an expected substring.

Then the downloaded file name should be "report.pdf"

Assert the most recent download's filename equals an expected value.

Then the downloaded file name should contain "report"

Assert the most recent download's filename contains a substring.

Then the downloaded file should be a zip archive containing the following files named:

(Pending) Assert the downloaded ZIP archive contains the listed filenames exactly.

Then the downloaded file should be a zip archive containing the following files partially named:

(Pending) Assert the downloaded ZIP contains files whose names contain the listed substrings.

Then the downloaded file should be a zip archive not containing the following files partially named:

(Pending) Assert the downloaded ZIP does NOT contain files whose names contain the listed substrings.

Back to all step groups