Adding download assertions

Adding download steps in your mabl trainer

Mabl detects and adds download steps automatically whenever a download completes during a training session.

  1. Start a new test or edit/retrain an existing test.
  2. Trigger the download of interest (e.g. click download link/button). Upon download completion, mabl will show a new step for your download.

Working with download assertions

By default, downloads will assert against the name of the downloaded file. You may add/edit additional assertions by hovering over the download assertion step and clicking the edit icon that appears.


Waiting on downloads

Mabl will detect the moment a download completes and assert against it then. There is no need to add explicit waits to work with downloads, unless the download takes longer than the default 30 second download timeout. This timeout is not presently configurable.


Download Auto-numbering Removal

Browsers add numbers to repeatedly downloaded files. For example, will be foo (1).zip when downloaded twice in Google Chrome. The download filename assertion will automatically elide these numbers during assertions so that foo (1).zip becomes for the assertion comparison. This feature enables replay testing without need of manual file cleanup.

Additional assertions include

  • Filename - assert downloaded file has the give file name (case sensitive), except for auto-numbering
  • MIME type - assert downloaded file was sent with the expected headers (case insensitive)
  • Exact file size - assert downloaded file is an exact size in bytes
  • Minimum file size - assert downloaded file is at least a given number of bytes
  • Maximum file size - assert downloaded file is at most at given number of bytes


Manual download limit

When training in Chrome, you may only automatically download the file 100 times due to Chrome limits. After downloading the same file 100 times, Chrome will open a save file modal for every additional download, preventing automatic replay of the download step. Remove the downloaded files to restore replay functionality.

Concurrent download support

Mabl presently supports only sequential downloads. If you have a use case requiring multiple parallel downloads, please let us know via Feature Requests.

Browser support

Training: Google Chrome
Cloud Execution: Google Chrome, Firefox

Did this page help you?