Introduction
In a Web Test, you can add steps to verify file downloads. After you trigger a file download, you can extract information about the file in variables.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:Extract Name of Most Recent Downloaded File
Extract Size of Most Recent Downloaded File
Extract MIME Type of Most Recent Downloaded 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.
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.
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.
File downloads can be tested in Chrome, Edge, Firefox, and mobile browsers.
File downloads cannot be tested in Safari and Internet Explorer 11.