Skip to content

Browser check quickstart

This guide builds a check that logs into a demo site and confirms the dashboard loads.

The script is plain JavaScript that runs inside an async function with page (Playwright Page) and step (wrapper) injected.

// Open the homepage
await step('Open homepage', async () => {
await page.goto('https://demo.siteqwality.com', { waitUntil: 'networkidle' });
});
// Click "Sign in"
await step('Open sign-in form', async () => {
await page.click('text=Sign in');
await page.waitForSelector('input[name="email"]');
});
// Fill credentials and submit
await step('Submit credentials', async () => {
await page.fill('input[name="email"]', 'demo@example.com');
await page.fill('input[name="password"]', 'demo-password-1234');
await page.click('button[type="submit"]');
});
// Confirm the dashboard rendered
await step('Confirm dashboard loaded', async () => {
await page.waitForSelector('h1:has-text("Dashboard")', { timeout: 10000 });
});

A step that throws fails the whole check. Every step captures a screenshot, pass or fail.

  1. Go to Observe → Monitors, open Add monitor and choose Browser check.

  2. Configure:

    • Name: Demo login flow.
    • Frequency: Every 15 minutes.
    • Timeout (seconds): 90.
    • Locations: keep the default, Virginia (aws-us-east-1). On a paid Synthetic plan you can add more; see locations.
    • Notification groups: leave the Default group selected.
  3. Paste the script into the editor.

  4. Click Create browser check. The first run kicks off within a minute.

The check page lists its runs under Recent results. Click the latest one to see step results, screenshots, the HAR, the video, and web vitals. Check now starts a run straight away.

  • Wait for network idle at navigation ({ waitUntil: 'networkidle' }) for SPAs.
  • Use text selectors (text=Sign in) over CSS classes. They survive design refactors.
  • Wait for selectors before interacting. await page.waitForSelector(...) then await page.click(...) is more robust than click() alone.
  • Set explicit timeouts on assertions. waitForSelector(..., { timeout: 10000 }) is clearer than relying on the default 30s.

To iterate, edit the script, save, and click Check now.