Endtest

Endtest

›Web Tests

Web Tests

  • How to create Web Tests
  • Finding elements in Web Applications
  • How to execute Web Tests
  • Assertions for Web Tests
  • IF Statements for Web Tests
  • Web Applications with restricted access
  • How to test in iframes
  • How to test in multiple tabs
  • How to test File Uploads
  • How to test File Downloads
  • How to test Emails
  • How to test PDF files
  • How to test Chrome Extensions
  • Dealing with reCAPTCHA
  • Dealing with Dynamic Locators
  • Dealing with Canvas Elements
  • Performing a Drag and Drop
  • Execute JavaScript
  • Testing WebRTC Applications
  • How to scroll in Web Tests
  • How to test Checkboxes
  • How to test Dropdowns
  • Dealing with Sessions
  • Web Crawler
  • Export Web Tests
  • Migrating from Selenium

Mobile Tests

  • How to create Mobile Tests
  • Finding elements in Mobile Applications
  • How to execute Mobile Tests
  • Assertions for Mobile Tests
  • IF Statements for Mobile Tests
  • How to scroll in Mobile Tests
  • Performing Complex Gestures

Advanced

  • Variables
  • Waits
  • Endtest API
  • Scheduler
  • Drive
  • Adding Collaborators
  • Computer Vision
  • Importing Test Cases
  • Using Loops
  • Data-driven Testing
  • Send API Requests
  • Read SMS
  • Execute SQL queries
  • Self-Healing Tests
  • Email Notifications
  • Slack Notifications
  • PagerDuty Notifications
  • Webhook Notifications
  • Automatic Backup
  • Advanced Settings
  • Multiple environments
  • How to stop a test
  • Utilities
  • Utilities API
  • Team
  • On-Premises

Integrations

  • Atlassian Jira
  • Slack
  • PagerDuty
  • Microsoft Teams
  • Mattermost
  • Jenkins
  • GitHub
  • Azure DevOps
  • GitLab
  • TeamCity
  • CircleCI
  • TravisCI
  • Bitbucket
  • Heroku
  • Bamboo Server
  • Test Case Management
  • SSO
  • BrowserStack
  • Sauce Labs

How to test File Downloads

Introduction

In a Web Test, you can add steps to verify the file downloads.

After you triggered a file download, you can extract information about the file in variables.

And then you can use those variables in other steps, such as Assertions and If Statements.

Details

You can extract information about a downloaded file by using these methods from the Set Variable action:

  1. Extract Name of Most Recent Downloaded File
  2. Extract Size of Most Recent Downloaded File
  3. Extract MIME Type of Most Recent Downloaded File
  4. Link to Most Recent Downloaded File

The Link to Most Recent Downloaded File method uploads the downloaded file directly from the machine that executed the test.

And the resulting variable will contain the link that you can use to download that file.

Waiting for a download to complete

Endtest will automatically wait for a download to complete when using one of those methods.

There is no need to add a Pause step, unless the download takes more than 120 seconds, which is the default download timeout.

After you extracted the information in variables, you can verify the values from those variables by using the Variable Assertion method from the Add Assertion action.

You can also clear the Downloads directory by using the Clear Downloads Directory method from the Miscellaneous action.

Browser Support

File downloads can be tested in Chrome, Edge, Firefox and mobile browsers.

File downloads cannot be tested in Safari and Internet Explorer 11.

← How to test File UploadsHow to test Emails →
  • Introduction
  • Details
© Endtest Inc.