Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platform/private-locations/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ new ApiCheck('hello-api-1', {

## Unavailable Private Locations

If a private location has had no Checkly agents connected for more than 10 minutes, it will be flagged as unavailable. Checkly will email account owners and admins that the location has become unavailable.
If a private location has checks assigned but no Checkly agents connected for more than 20 minutes, it will be flagged as unavailable. Checkly will email account owners and admins when this happens.

While a location is unavailable, no checks will be scheduled to run on it. When a location becomes available, check scheduling and execution will resume automatically.

Expand Down
2 changes: 1 addition & 1 deletion skills/playwright-best-practices-for-agents/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---
name: playwright-best-practices-for-agents
description: Agent-first best practices for writing, structuring, debugging, and stabilizing Playwright tests in TypeScript/JavaScript, built around Playwright's agent CLI (`playwright-cli`) and no-GUI agentic debugging flows. Use when authoring or reviewing Playwright tests: choosing locators, writing web-first assertions, fixing flaky tests, handling authentication (SSO/2FA), mocking network/API requests, structuring projects and fixtures, generating test data, building forms and validation, pressing keys and keyboard shortcuts, hovering and other mouse actions, handling native alert/confirm/prompt dialogs, uploading or downloading files, testing iframes, multiple tabs/popups or multi-user flows, mobile and device emulation, mocking time and dates, visual regression and screenshots, tagging and annotating tests, catching console errors, testing error/offline/loading states, configuring global setup, or running Playwright in CI.
description: "Agent-first best practices for writing, structuring, debugging, and stabilizing Playwright tests in TypeScript/JavaScript, built around Playwright's agent CLI (`playwright-cli`) and no-GUI agentic debugging flows. Use when authoring or reviewing Playwright tests: choosing locators, writing web-first assertions, fixing flaky tests, handling authentication (SSO/2FA), mocking network/API requests, structuring projects and fixtures, generating test data, building forms and validation, pressing keys and keyboard shortcuts, hovering and other mouse actions, handling native alert/confirm/prompt dialogs, uploading or downloading files, testing iframes, multiple tabs/popups or multi-user flows, mobile and device emulation, mocking time and dates, visual regression and screenshots, tagging and annotating tests, catching console errors, testing error/offline/loading states, configuring global setup, or running Playwright in CI."

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

Use 'command-line tool' instead of 'CLI'.

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

Use parentheses judiciously.

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

Did you really mean 'agentic'?

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

Spell out 'SSO', if it's unfamiliar to the audience.

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

Did you really mean 'dialogs'?

Check warning on line 3 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L3

'multiple' is too wordy.
metadata:
author: checkly
---

# Playwright best practices

Condensed, opinionated guidance for writing Playwright tests that are **readable, isolated, and resilient** — built for coding **agents**, around Playwright's **agent CLI** (`playwright-cli`) and its no-GUI debugging flows. Maintained by [Checkly](https://www.checklyhq.com/?utm_source=ai-skill) — the same practices apply whether you run these tests in CI or as production monitors.

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Use parentheses judiciously.

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Try to avoid using 'are'.

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Don't put a space before or after a dash.

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Use 'command-line tool' instead of 'CLI'.

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Did you really mean 'Checkly'?

Check warning on line 10 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L10

Don't put a space before or after a dash.

Load a reference file from `references/` only when the task needs it (see routing table). Each reference ends with links to the full `/learn` articles for depth.

Check warning on line 12 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L12

Use parentheses judiciously.

> **Scope:** all guidance assumes the **`@playwright/test`** test runner with **TypeScript** — its `test`, fixtures, projects, config, and web-first `expect`. Examples are TypeScript (`.spec.ts`); the same APIs work in JavaScript. It does not target the standalone `playwright` automation library (which has no test runner, fixtures, or auto-retrying assertions). Imports are `import { test, expect } from '@playwright/test'`.

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Don't put a space before or after a dash.

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Did you really mean 'config'?

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Try to avoid using 'are'.

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Did you really mean 'APIs'?

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Use 'doesn't' instead of 'does not'.

Check warning on line 14 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L14

Try to avoid using 'are'.

> **The agent CLI is what makes this skill shine.** Playwright's **agent CLI** — `playwright-cli`, package `@playwright/cli` — is a separate, token-efficient, **no-GUI** browser you drive command by command to discover locators and step through failing tests. It's distinct from the standard `npx playwright` CLI, and the **Agentic workflow** below leans on it throughout. → [references/debugging.md](references/debugging.md)

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Use 'command-line tool' instead of 'CLI'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Try to avoid using 'is'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Use 'command-line tool' instead of 'CLI'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Don't put a space before or after a dash.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Don't put a space before or after a dash.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Try to avoid using 'is'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Try to avoid using 'It's'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Use 'command-line tool' instead of 'CLI'.

Check warning on line 16 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L16

Did you really mean 'Agentic'?

## Core rules (always apply)

Check warning on line 18 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L18

Use parentheses judiciously.

1. **Locator priority:** prefer user-facing locators — `getByRole` > `getByLabel` / `getByPlaceholder` / `getByText` > `getByTestId` > CSS/XPath. CSS/XPath tie tests to implementation and break easily. → [references/locators.md](references/locators.md)

Check warning on line 20 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L20

Don't put a space before or after a dash.

Check warning on line 20 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L20

Using 'easily' may come across as condescending.
2. **Web-first assertions:** use auto-retrying `expect(locator).toBeVisible()` / `toHaveText()` etc. Never assert on a one-shot value you pulled out manually (`innerText()` then `toBe`). → [references/assertions.md](references/assertions.md)

Check warning on line 21 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L21

Use parentheses judiciously.
3. **No hard waits:** never `waitForTimeout()`. Trust auto-waiting actions and web-first assertions; for explicit waits use `waitForURL` / `waitForLoadState` / `waitForResponse`. Avoid `networkidle`. → [references/waiting.md](references/waiting.md)
4. **Isolated & independent:** each test sets up its own state and can run in any order, in parallel. No test depends on another. Provision state via API in setup, not through the UI. → [references/test-structure.md](references/test-structure.md), [references/flakiness.md](references/flakiness.md)
5. **One feature per test:** if a test's assertions span more than one feature, split it. Keep tests short and focused.
Expand All @@ -26,48 +26,48 @@

## Routing table

| When the task is about… | Read |

Check warning on line 29 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L29

Try to avoid using 'is'.
|---|---|
| Picking selectors, strict mode, `data-testid` | [references/locators.md](references/locators.md) |
| Assertions, soft assertions, `expect.poll`/`toPass` | [references/assertions.md](references/assertions.md) |
| Waiting, auto-waiting, timeouts, navigation | [references/waiting.md](references/waiting.md) |
| Test design, fixtures, Page Object Model, steps | [references/test-structure.md](references/test-structure.md) |
| `playwright.config.ts`, projects, baseURL, devices, setup dependencies | [references/config.md](references/config.md) |
| Login, 2FA/TOTP, SSO, sessions, `storageState` | [references/auth.md](references/auth.md) |

Check warning on line 36 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L36

Spell out 'TOTP', if it's unfamiliar to the audience.

Check warning on line 36 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L36

Spell out 'SSO', if it's unfamiliar to the audience.
| Mocking, intercepting, `route`, HAR, API testing | [references/network.md](references/network.md) |

Check warning on line 37 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L37

Spell out 'HAR', if it's unfamiliar to the audience.
| Debugging failures, `playwright-cli`, `--debug=cli`, traces, common errors | [references/debugging.md](references/debugging.md) |
| Flaky tests, retries, parallelism, anti-patterns | [references/flakiness.md](references/flakiness.md) |
| Running in CI, sharding, reporters, GitHub Actions | [references/ci.md](references/ci.md) |

Check warning on line 40 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L40

Did you really mean 'sharding'?
| Test data, factories, unique data, seeding/cleanup | [references/test-data.md](references/test-data.md) |
| Forms, inputs, validation, error messages | [references/forms.md](references/forms.md) |
| Keyboard, mouse, hover, scroll, native dialogs (alert/confirm/prompt) | [references/interactions.md](references/interactions.md) |

Check warning on line 43 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L43

Did you really mean 'dialogs'?

Check warning on line 43 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L43

Use parentheses judiciously.
| File upload & download | [references/files.md](references/files.md) |
| iframes, frames, `frameLocator` | [references/iframes.md](references/iframes.md) |
| Multiple tabs, popups, multiple users/contexts | [references/multi-context.md](references/multi-context.md) |

Check warning on line 46 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L46

'Multiple' is too wordy.

Check warning on line 46 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L46

'multiple' is too wordy.
| Mobile, device emulation, touch, viewport/breakpoints | [references/mobile.md](references/mobile.md) |

Check warning on line 47 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L47

Use 'tap' instead of 'touch'.
| Time/date, clock mocking, countdowns, timeouts | [references/clock.md](references/clock.md) |
| Visual regression, screenshots, `toHaveScreenshot`, aria snapshots | [references/visual.md](references/visual.md) |
| Tags (`@smoke`), `--grep`, `skip`/`fixme`/`slow` annotations | [references/tags-annotations.md](references/tags-annotations.md) |

Check warning on line 50 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L50

Use parentheses judiciously.
| Failing tests on `console`/`pageerror` | [references/console-errors.md](references/console-errors.md) |
| `globalSetup`/`globalTeardown`, setup projects | [references/global-setup.md](references/global-setup.md) |
| Error, offline, network-failure, loading states | [references/error-states.md](references/error-states.md) |

Check warning on line 53 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L53

Be careful with 'failure', it's profane in some cases.

## Agentic workflow (no GUI)

Check warning on line 55 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L55

Did you really mean 'Agentic'?

Check warning on line 55 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L55

Use parentheses judiciously.

The interactive tools — `--ui`, `--debug` (Inspector), `show-trace` — are GUIs you can't drive. Author and debug through the non-interactive signals instead.

Check warning on line 57 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L57

Don't put a space before or after a dash.

Check warning on line 57 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L57

Use parentheses judiciously.

Check warning on line 57 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L57

Try to avoid using 'are'.

Check warning on line 57 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L57

Did you really mean 'GUIs'?

> **Having `playwright-cli` available is highly encouraged** — both phases below lean on it. Confirm with `playwright-cli --version` and install it if missing — `npm install -D @playwright/cli`, then run it via `npx playwright-cli` (or install globally with `npm install -g @playwright/cli` to call `playwright-cli` directly). Everything still works without it, but you lose the inspect/verify loop and fall back to guessing.

Check warning on line 59 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L59

Use parentheses judiciously.

Check warning on line 59 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L59

Try to avoid using 'is'.

Check warning on line 59 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L59

Don't put a space before or after a dash.

**Author — discover, don't guess.** Read locators off the live page rather than from source: `playwright-cli open <url>` → `playwright-cli snapshot` prints the accessibility tree — the roles and accessible names that power `getByRole`/`getByLabel` — so you author the user-facing locator straight from what it shows. → [references/locators.md](references/locators.md)

Check warning on line 61 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L61

Don't put a space before or after a dash.

Check warning on line 61 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L61

Don't put a space before or after a dash.

**Run & debug:**

1. **Run and read stdout:** `npx playwright test path/to/file.spec.ts`. The reporter prints the failing assertion and the **call log** — which locator/assertion timed out and what Playwright actually saw. Read it; don't guess.

Check warning on line 65 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L65

Did you really mean 'stdout'?

Check warning on line 65 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L65

Don't put a space before or after a dash.
2. **Read `error-context.md`:** on an `expect` failure Playwright writes an aria-snapshot of the page *at the moment it failed* to the test's `test-results/.../error-context.md`. This is machine-readable page state — open it to see what was actually rendered. *(Playwright ≥ 1.60)*

Check warning on line 66 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L66

Be careful with 'failure', it's profane in some cases.

Check warning on line 66 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L66

Try to avoid using 'is'.

Check warning on line 66 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L66

Don't put a space before or after a dash.

Check warning on line 66 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L66

Try to avoid using 'was'.
3. **Capture artifacts, not GUIs:** add `--trace on` to drop `trace.zip` into `test-results/` for inspection.

Check warning on line 67 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L67

Did you really mean 'GUIs'?
4. **Step through it live with `playwright-cli`** (no GUI): run `npx playwright test path/to/file.spec.ts --debug=cli` in the background — it pauses and prints a session name. Then `playwright-cli attach <session-name>` and drive it: `playwright-cli snapshot` (page state + element refs), `playwright-cli step-over`, `playwright-cli console error`, `playwright-cli network`, `playwright-cli eval "…"`. Inspect why the locator didn't resolve or what actually rendered, then fix and re-run. *(needs the agent CLI; full detail in [references/debugging.md](references/debugging.md))*

Check warning on line 68 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L68

Don't put a space before or after a dash.
5. **Fix the root cause** (usually a locator, a missing web-first assertion, or a hard wait), then re-run until green. Don't paper over flakiness with retries — see [references/flakiness.md](references/flakiness.md).

Check warning on line 69 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L69

Use parentheses judiciously.

Check warning on line 69 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L69

'usually' is a weasel word!

Check warning on line 69 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L69

Don't put a space before or after a dash.

Full agentic-debugging detail (the `playwright-cli` discovery and `--debug=cli` stepping workflow) is in [references/debugging.md](references/debugging.md).

Check warning on line 71 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L71

Use parentheses judiciously.

Check warning on line 71 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L71

Try to avoid using 'is'.

> **Stay current.** These primitives are recent and version-gated — check `npx playwright --version` and `playwright-cli --version`, and update both packages if they're behind. Detail in [references/debugging.md](references/debugging.md).

Check warning on line 73 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L73

Try to avoid using 'are'.

Check warning on line 73 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L73

Don't put a space before or after a dash.

Check warning on line 73 in skills/playwright-best-practices-for-agents/SKILL.md

View check run for this annotation

Mintlify / Mintlify Validation (checkly-422f444a) - vale-spellcheck

skills/playwright-best-practices-for-agents/SKILL.md#L73

Try to avoid using 'they're'.
Loading