Skip to main content
Experience faster, smarter testing with BrowserStack AI Agents. See what your workflow’s been missing. Explore now!
No Result Found
Connect & Get help from fellow developers on our Discord community. Ask the CommunityAsk the Community

Validate downloaded files with Low Code Automation

Learn how to validate metadata of file downloads effectively with Low Code Automation.

Low Code Automation simplifies the process of validating file downloads by automating the verification of key metadata such as file name, size, extension, and content accuracy using MD5 checks. You can easily add checks if the downloaded file matches the expected details, reducing manual effort and ensuring accuracy.

The Validate Downloaded Files feature is available only in the Low Code Automation Pro plan. For more details, contact us.

Steps to validate downloaded files

  1. In Low Code Automation, while recording a test, click on the element in your web application that downloads a file. A prompt appears on the recorder indicating that the file is downloading. Once the download is complete, the validation step is automatically captured on the recorder panel. View file download on the recorder
  2. Select the Validate (file) downloaded step in the recorder panel to open the validation page. Add validations to the downloaded file
  3. Click Download to view to access the file.
  4. Enable the toggle and add the following validation 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 or not 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 or not 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, or less than or equal to the captured value.
  5. Enable the Content validation 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.
  6. Click Save recording.

Edit the file download checks

  1. Go to All tests and select the required test.
  2. Click the Tests steps tab and click the Validate file downloaded step. Edit the file download validation without recorder
  3. In the step page, you can modify the validations for file name, file type, file size and content validation.
  4. Click Save recording.

Below is a sample test run showing successful file download validations. View file download step passed

To view the details of the passed validations, including file name, size, extension, and content, click See details.

View file download passed 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 with blob:, 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





Thank you for your valuable feedback

Is this page helping you?

Yes
No

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!

Talk to an Expert
Download Copy Check Circle