Automation lab Aú File Handling (FILE_HANDLING)

Lab 062: Reject image larger than 5MB

Practice reject image larger than 5mb in a real web app context as part of the File Handling module.

intermediate intermediate
intermediate

Objectives

Use for test scripts
  • Understand the purpose and business flow of reject image larger than 5mb.
  • Design stable locators for key UI elements.
  • Automate user interactions and verify the resulting UI state.

Sandbox

File Handling / file / intermediate / active

Reject image larger than 5MB

Block uploads when image size exceeds 5MB and show error.

Reading and understanding requirements Choosing stable locators Designing assertions based on business rules

Learning objectives

  • Reject oversized images.
  • Provide clear error messaging.
  • Keep previous accepted state separate.

Steps

  1. Select an image > 5MB → error.
  2. Select an image <= 5MB → success.
  3. Verify status and message reflect outcome.

No file selected

Last accepted: none

Assertions to practice

  • Files over 5MB rejected with error text.
  • Valid file updates "Last accepted".
  • Status shows size and result.