Trigger and verify a download
Medium70 pts
- waitForEvent
- Downloads
- File Handling
Practice app · Document Vault
File upload and download, cookies, localStorage, sessionStorage and JavaScript execution.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Intercept and verify a file download event when exporting reports.
Your Task
- 1Navigate to the file management vault at TEST_URL.
- 2Set up an asynchronous listener for the browser download event.
- 3Click the download report button (#download-button or #download-report).
- 4Await the completed download event.
- 5Assert that the downloaded file's suggested filename is 'report.csv'.
Validation Checks
- File management vault is loaded at TEST_URL
- Download event listener is registered before clicking
- Download button (#download-button) is clicked
- Downloaded file's suggested filename is verified as 'report.csv'
- At least 1 assertion passes
Playwright · Playwright Practice Track · Actions & inputs