The outcome

Operate repeatable browser automation without leaking tokens or leaving sessions and retries uncontrolled.

Step by step

A workflow you can repeat.

  1. 01

    Document authorization, target domains, expected page states, data retention, regional needs, concurrency, timeout, and stop conditions.

  2. 02

    Store the API token in a server-side secret and connect existing Puppeteer or Playwright code to the correct regional WebSocket endpoint.

  3. 03

    Use stable selectors and explicit waits, validate navigation and downloads, and treat all page content as untrusted data rather than instructions.

  4. 04

    Test redirects, consent dialogs, authentication expiry, queues, timeouts, partial loads, rate limits, and retries with idempotent checkpoints.

  5. 05

    Close sessions in every code path, redact logs and screenshots, monitor duration and concurrency, and keep a documented local or alternate fallback.

Working standard

What good use looks like.

  • Protect tokens as server secrets.
  • Design retries around checkpoints.
  • Close every browser session.

Official references

Check the current product documentation.