Skip to main content
By the end of this guide, one Playwright test checks that your shop’s home page shows the content that sells, runs every five minutes from two regions, and names the exact text that went missing when it fails.
The Shop home page content Playwright Check Suite in Checkly, passing, running every 5 minutes from N. Virginia and Ireland, managed by the Docs guide project
To follow along without your own app, clone the sample project. It monitors the home page of the Danube demo shop.
To run this guide from your terminal or your coding agent, run npx checkly init in your project first. It installs the Checkly CLI and Checkly Skills for your agent. Then paste the prompt below into Claude Code, Cursor, Codex, or any agent that supports skills. It builds the same setup as this guide, proves it with npx checkly test --record, and stops for your confirmation before npx checkly deploy.
Prompt
The steps below are what the agent does, in the open.

Step 1: Write down what must be on the page

An uptime monitor tells you the home page answered. It can’t tell you the page is selling. If a deploy drops your best seller from the top spot, duplicates the offer banner, or renders an error message inside a healthy 200 response, customers notice long before a status code does. Write each of those expectations as an assertion:
tests/home-content.spec.ts
Every assertion is web-first, so Playwright retries it until it passes or times out. There is no wait to tune. See waits and timeouts for why that matters.

Step 2: Match the keyword where it belongs

The simplest keyword check is page.getByText('keyword'). It works until the keyword appears more than once. On the Danube shop, every book costs $9.95:
Terminal
Adding .first() makes the error go away and the check useless: it passes as long as any book costs $9.95. The test in Step 1 answers a sharper question instead. Each choice maps to a way content breaks:
  • Position matters: the best seller is located as the first .preview card, and toHaveText requires its title to be exactly “Haben oder haben”. A reorder fails the check, and so does a truncated or renamed title.
  • Context matters: the price is looked up inside the best seller’s card, so it checks that book’s price, not any price.
  • Duplicates matter: toHaveCount(1) fails if the offer banner disappears and also if a layout bug renders it twice.
  • Wording varies: the call to action is matched by role and a case-insensitive regular expression, so marketing can rename “Sign up” to “Create an account” without breaking the monitor. Regular expressions in Playwright are case-sensitive unless you add the i flag.
  • Absence matters: toHaveCount(0) turns error copy into a failure, even when the page itself loads fine.

Step 3: Run it on a schedule

Run the test as a Playwright Check Suite, or as a Browser Check if you prefer one file per check. Both use the same spec file.
The Playwright Check Suite reads playwright.config.ts, which keeps a trace and a screenshot of every failure:
playwright.config.ts
Run both on Checkly before you deploy:
Terminal
Terminal
Terminal

Verify it works

Simulate the shop reordering its best sellers. In tests/home-content.spec.ts, change the expected title from 'Haben oder haben' to 'Parry Hotter', the second book on the page, and run npx checkly test --record again. Both checks fail. The result names the assertion, the text it expected, and the text it found:
A failed Checkly test case named home page shows the content that sells, with the error expect locator toHaveText failed, expected Parry Hotter, received Haben oder haben, and the failing line of the spec highlighted
Change the title back before you deploy again.

Next

Monitor from around the globe: content can differ by region when a CDN serves a stale page or a locale redirect goes wrong. Choose the locations that match where your customers are.

Reference