Validate File Was Downloaded
Use the Validate File Was Downloaded step to confirm that a specific file was downloaded successfully during a test.
When to Use
Add this step when you need to:
- Confirm that clicking a Download button saves the correct file.
- Verify that the downloaded file has the expected name or correct file extension.
How to Add a Validate File Was Downloaded Step
Download the file during recording by interacting with the download trigger (for example, clicking a Download button).
In the Recorder, click Add a Verification Step.
Choose Validate file exists from the list of available verifications.
In the modal, browse the Downloads folder and select the file you want to validate.
Define how to match the file name using the Match type dropdown:
- Is exactly – Matches the file name exactly.
- Contains – Validates that the file name includes a specific substring.
- File format is – Confirms the file extension (for example,
.pdf
,.csv
). - Matches regex – Uses a regex pattern to verify flexible or dynamic file names (helpful for timestamped files).
During test execution, the recorder checks whether the file exists in the downloads folder after the trigger action completes.
Viewing the Step
You can see this step in the Recorder scenario view under the Features page:
After running the scenario, the verification result appears in the Reports page:
Best Practices
- Use exact match when the file name is consistent.
- Use regex when file names are dynamic, such as those with timestamps.
- Validate file extensions when the content is more important than the exact name (for example, checking that a report is always a
.csv
). - Keep your downloads folder clear before tests to prevent false positives from old files.