I1 · request fixture and APIRequestConte: Playwright's `request` fixture is the TypeScript counterpart of the `given()` you saw in REST Assured in H1 — `APIRequestContext` is a c
Playwright's `request` fixture is the TypeScript counterpart of the `given()` you saw in REST Assured in H1 — `APIRequestContext` is a client that sends HTTP requests directly WITHOUT opening a browser. So why does Playwright, already a BROWSER automation tool, carry a separate API client? Because GROUP I's real power (as you will see in I3) is being able to COMBINE API and UI in the SAME test file — without switching to a separate tool (REST Assured), you can both hit `/api/v1/bugs` and control the browser in the same TypeScript test file. The Java equivalent is injecting and using an HttpClient inside a Selenium test — possible, but Playwright makes it a NATURAL part of the framework. **For a deep Playwright guide → see the `/playwright` page; here we only see the API side.**
🎬 Sending a Request Without Opening a Browser
test('...', async ({ request }) =>
A Playwright test asks for the `request` fixture as a parameter.
Playwright provides an `APIRequestContext` — NO browser tab opens.
`request.get(...)` sends an HTTP request directly to `/api/v1/bugs` — fast and independent of browser overhead.
The Order for Writing the First Playwright API Test
Set up @playwright/test…
No extra setup needed if the project is already set up.
Get the request fixture…
Destructure { request } in the test function's parameter.
Send a direct request to /api/v1/bugs with request.get/post.
Order the steps for writing an API test with Playwright.
Take the { request } parameter in the test function