Automation lab Aú File Handling (FILE_HANDLING)
Lab 065: Validate file extension whitelist
Practice validate file extension whitelist 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 validate file extension whitelist.
- Design stable locators for key UI elements.
- Automate user interactions and verify the resulting UI state.
Sandbox
File Handling / file / intermediate / active
Validate file extension whitelist
Allow only .png and .jpg uploads; reject everything else.
Reading and understanding requirements
Choosing stable locators
Designing assertions based on business rules
Learning objectives
- Whitelist specific extensions.
- Show success/error messages.
- Expose last accepted file name.
Steps
- Select a .png or .jpg → success.
- Select another type → error.
- Verify status and last accepted fields.
No file selected
Last accepted: none
Assertions to practice
- Error for non-whitelisted extensions.
- Success for .png/.jpg.
- Status shows file name and result.