Automation lab Aú File Handling (FILE_HANDLING)
Lab 068: Download file and verify size
Practice download file and verify size in a real web app context as part of the File Handling module.
intermediate
intermediate
Objectives
Use for test scripts- Understand the purpose and business flow of download file and verify size.
- Design stable locators for key UI elements.
- Automate user interactions and verify the resulting UI state.
Sandbox
File Handling / file / intermediate / active
Download file and verify size
Download a mock file and compare size to expected bytes.
Reading and understanding requirements
Choosing stable locators
Designing assertions based on business rules
Learning objectives
- Trigger download link.
- Expose expected file size (in bytes).
- Show status for pass/fail comparison.
Steps
- Download file.
- Check size equals expected (1024 bytes).
- Mark status accordingly.
Download mock file
Expected size: 1024 bytes
Download then verify size in your test
Assertions to practice
- File downloads with name mock.txt.
- Size equals 1024 bytes.
- Status text can be updated by your automation after verification.