new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

apiresponseassertions

2 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

APIResponseAssertions class overview

The APIResponseAssertions class provides assertion methods that can be used to make assertions about the APIResponse in tests. It has been available since v1.18.

APIResponseAssertions example usage

Example of using APIResponseAssertions in a test: JavaScript: import { test, expect } from '@playwright/test'; test('navigates to login', async ({ page }) => { const response = await page.request.get('https://playwright.dev'); await expect(response).toBeOK(); }); Python async: from playwright.async_api import Page, expect async def test_navigates_to_login_page(page: Page) -> None: response = await page.request.get('https://playwright.dev') await expect(response).to_be_ok() C#: var response = await Page.APIRequest.GetAsync("https://playwright.dev"); await Expect(response).ToBeOKAsync();

Give your agent this brain