Validate downloaded file and its content
Learn how to effectively validate the metadata and content of files downloaded during test execution using Low Code Automation.
Low Code Automation simplifies the process of validating file downloads and their content. It lets you automate the verification of key metadata such as file name, size, extension, and content accuracy using MD5 checks. Low Code Automation also supports validating content-level details, even for dynamic files with changing data.
Whether downloading invoices, statements, reports, or other documents from a website, Low Code Automation ensures that files meet expected metadata criteria and contain the correct and relevant information. This end-to-end validation capability reduces manual effort, improves reliability, and enhances the overall accuracy of automated workflows.
The Validate downloaded files and their content feature is available exclusively in the Low Code Automation Pro plan. For more details, contact us.
When testing file downloads, it’s important to validate both metadata (like file name, type, and size) and content (for formats like PDF or CSV). In Low Code Automation, these validations can be seamlessly added during test recording.
Validate metadata of the file
- In Low Code Automation, when you click on any element that triggers a file download during test recording, a step is automatically recorded to validate the metadata of the downloaded file.
- Click the Validate file.pdf downloaded with name, type and size step.
- Under the Validations section, configure the following checks:
-
File name: Enter the expected name of the file. For example, Report_2025. You can filter the file name by checking if it
equals
,contains
,starts with
,not equals
,not contains
ornot starts with
the captured value. -
File type: Specify the expected file type. For example, pdf, csv, xlsx. You can filter a file type to check if it is
equals
ornot equals to
the captured value. -
File size: Enter the expected file size in KB, MB and GB. You can filter a file’s size to check if it is
greater than
,greater than or equal to
,less than
, orless than or equal to
the captured value. - Content validation: Enable this toggle to add validation to the file content using MD5 checks. An MD5 checksum is a 32-character hexadecimal number that is computed on a file. If two files have the same MD5 checksum value, then the contents of the two files are the same. In Low Code Automation, an MD5 hash of the file content is automatically generated during recording which is compared with the one generated during replay to ensure the content matches. This check is preferable for static content only.
-
File name: Enter the expected name of the file. For example, Report_2025. You can filter the file name by checking if it
- Click Save recording.
Validate contents of the PDF or CSV file
If the file type is PDF or CSV, Low Code Automation also allows you to validate its contents:
- Upon opening the file, a dialog box prompts you to validate the content. Click Open PDF or Open CSV. The file opens in a new browser window. Content validation is currently supported only for PDF and CSV files.
- Alternatively, you can click the Validate (file) downloaded step and click Open to validate content.
- Perform actions or validations on the file contents as you would do on a normal web page to record the steps.
- Optionally, click Download to view to manually inspect the file.
- Click Save recording.
Edit the file download checks
- Go to All tests and select the required test.
- Click the Tests steps tab and click the Validate file downloaded step.
- In the step page, you can modify the validations for file name, file type, file size and content validation.
- Click Save recording.
Below is a sample test run showing successful file download validations.
To view the details of the passed validations, including file name, size, extension, and content, click See details.
File download limitations
- Due to Chrome’s security restrictions, PDF files served via
blob:
URLs can be validated when they are embedded in the page or downloaded programmatically. However, if the file is opened directly in a new tab and the address bar starts withblob:
, validations may not work as expected. - On Safari, PDF files may open directly in the browser’s built-in preview instead of triggering a download. In such cases, the file is not accessible for validation.
- Files larger than 25 MB are currently not supported for validation.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!