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

assertion methods - locators

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.

Recommended assertion matchers for Playwright tests

The recommended assertion matchers are: toBeVisible() to check element is rendered and visible; toHaveText(text) to match element text content; toHaveValue(value) / toBeEmpty() to match input/select value; toBeChecked() / toBeUnchecked() to match checkbox state; toMatchAriaSnapshot(snapshot) to match page or locator against a partial accessibility snapshot.

toBeVisible() assertion usage guidance

When the locator is text-based, prefer toBeVisible() instead of toHaveText(). When asserting text content, ensure the generated locator does not contain text from the element itself; getByTestId() or getByLabel() usually work well for text assertions.

Give your agent this brain