1. Browser Checks
  2. Create a scripted browser check

Browser Checks

Create a scripted browser check

Use a scripted browser check when a URL check is not enough, such as login flows, multi-step checkout paths, or pages that need interaction before the important content appears.

Create the check

  1. Open Add Browser Check.
  2. Enter a check name.
  3. Write your Playwright script in the Playwright script editor.
  4. Choose a test frequency.
  5. Choose at least one region.
  6. Configure alerts.
  7. Click Save.

New scripted browser checks use Node.js 24 and Playwright.

Write the script

Your script must import from @playwright/test and include at least one test() or test.describe() block.

import { test, expect } from '@playwright/test';

test.setTimeout(90000);
test.use({ actionTimeout: 10000 });

test('check homepage', async ({ page }) => {
  const response = await page.goto('https://example.com');

  await expect(page.getByRole('heading', { name: 'Example Domain' })).toBeVisible();
  expect(response?.status(), 'should respond with correct status code').toBeLessThan(400);
});

Keep the script below the browser check timeout. OnlineOrNot gives browser checks up to 2 minutes, including browser startup, script execution, and cleanup.

Check a login flow

Use Playwright locators and assertions for authenticated pages.

import { test, expect } from '@playwright/test';

test.setTimeout(90000);
test.use({ actionTimeout: 10000 });

test('can log in', async ({ page }) => {
  await page.goto('https://example.com/login');
  await page.getByLabel('Email').fill('monitor@example.com');
  await page.getByLabel('Password').fill('your-test-account-password');
  await page.getByRole('button', { name: 'Log in' }).click();

  await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible();
});

Use a dedicated test account. Avoid personal accounts and avoid actions that send real emails, charge cards, or mutate production data unless the target app is designed for monitoring traffic.

Attach screenshots to failed runs

Screenshots saved with page.screenshot() are attached to the run output.

await page.screenshot({ path: 'dashboard.png' });

Use screenshots when you need context in failure traces.

Edit an existing browser check

  1. Open the browser check.
  2. Click Edit.
  3. Select Script check.
  4. Update the script.
  5. Click Save.

If Script check is disabled, switch the check version to Node.js 24 in advanced settings.

Troubleshoot validation errors

If the form says Script must import from @playwright/test, add this import:

import { test, expect } from '@playwright/test';

If the form says Script must contain at least one test() block, wrap your check in a Playwright test:

test('check page', async ({ page }) => {
  await page.goto('https://example.com');
});

For Playwright locator and assertion details, use the Playwright documentation.