Automation lab Aú API Interaction & Mocking (API_INTERACTION)
Lab 033: Validate API request headers
Practice validate api request headers in a real web app context as part of the API Interaction & Mocking module.
intermediate
intermediate
Objectives
Use for test scripts- Understand the purpose and business flow of validate api request headers.
- Design stable locators for key UI elements.
- Automate user interactions and verify the resulting UI state.
Sandbox
API & Network • api • intermediate • active
Validate API request headers
Ensure required headers are present before calling the API.
Reading and understanding requirements
Choosing stable locators
Designing assertions based on business rules
Learning objectives
- Collect headers from UI controls.
- Validate presence of Authorization and X-Client.
- Preview headers payload.
Steps
- Toggle required headers on/off.
- Send request and observe validation.
- Assert success only when both headers exist.
Practice sandbox
Toggle headers before send.
Headers payload
{}
Waiting for input
Assertions to practice
- Authorization and X-Client required.
- Status shows failure when missing.
- Preview reflects checkbox/field values.