Locus

From browser sessions to resilient Playwright tests.

Locus records evidence, builds editable steps, and verifies each target before acting.

Recording captures what happened

You use the application. Locus keeps the evidence, so nobody has to imagine page states.

  1. Add the snippet

    Copy it from your Locus dashboard into a development or staging site.

  2. Start a test case

    Open the site and begin recording from the Locus toolbar.

  3. Use the app

    Click, type and navigate through the real workflow.

  4. Stream the evidence

    Actions, DOM mutations, navigation and fetch or XHR calls are buffered and sent to ingestion.

The toolbar renders in its own Shadow DOM, so its interface never enters the recording.

Evidence becomes a test you can edit

The original DOM and network evidence stays as recorded. You edit the definition built from it.

Observation

Something the recording actually captured: a text change, a URL, a network response. Read-only evidence.

Assertion

An observation a tester promoted. It runs right after its step's action and waits resolve.

Step edits
  • Rename, reorder, duplicate, disable
  • Inputs as static values, environment variables or vault secrets
  • Review each target's locator strategies

Nothing becomes an assertion on its own, and no check is invented for a state the recording never saw.

Three locator families. No guessing.

Locus falls back to surviving, evidence-backed strategies. It does not guess when a target is ambiguous.

FamilyExampleResolves by
SemanticgetByRole('button', { name: 'Place order' })W3C ARIA role and accessible name
Stable attribute[data-testid="checkout-submit"]Explicit, non-volatile ids and test hooks
Relationalform#checkout > button[type="submit"]DOM hierarchy and text-anchored relationships

Each target needs three independent strategies, or two when one is a unique stable id or a trustworthy, unique role and name.

  1. Recorded

    All three strategies find one element.

    • Semantic1 matchgetByRole('button', { name: 'Place order' })
    • Stable attribute1 match[data-testid="checkout-submit"]
    • Relational1 matchform#checkout > button[type="submit"]
    Saved

    Geometry, position and neighbours kept as evidence.

  2. After a release

    The test id was renamed.

    • Semantic1 matchgetByRole('button', { name: 'Place order' })
    • Stable attributeNo match[data-testid="checkout-submit"]
    • Relational1 matchform#checkout > button[type="submit"]
    Click

    Survivors agree; position matches.

  3. Ambiguous

    A second "Place order" button appears.

    • Semantic2 matchesgetByRole('button', { name: 'Place order' })
    • Stable attributeNo match[data-testid="checkout-submit"]
    • Relational1 matchform#checkout > button[type="submit"]
    Blocked

    No unique target. Nothing is clicked.

Each step result records which strategy resolved and which failed. An illustration, not measured results.

Sign in once per run

A sign-in test saves Playwright storageState; later tests in the run start signed in.

The snapshot is encrypted and deleted when the collection run ends.

const context = await browser.newContext({ storageState });
The Playwright call a signed-in test launches with.

Network calls, tied to their step

Fetch and XHR traffic is recorded alongside the action that caused it.

Example observations from a checkout recording. Non-sensitive headers, timing and failures are kept too.
StepRequestStatusUse in the test
4 Click "Place order"POST /api/orders201Promoted to an assertion
4 Click "Place order"POST /api/orders201Extract $.data.id as order_id
5 Open the orderGET /api/orders/{{order_id}}200Uses the extracted value
2 Sign inPOST /api/session200Payload override from a vault secret

When a step fails, the evidence is there

Steps wait on conditions, not timers, and every signal is attributed to the step that produced it.

Waits
  • Element visible, hidden, enabled or disabled
  • Text on an element or the page
  • URL changes
  • Dialogs opening and closing, loading indicators gone
  • Network settling after each action
Evidence per step
  • JavaScript errors, console warnings and errors
  • Failed requests and 4xx or 5xx responses
  • Network timeline
  • Playwright trace with DOM snapshots
  • Screenshot on failure

Two places to run

  • Hosted workers

    Sandboxed Playwright workers run queued tests in Chromium or Firefox, against domains registered on your site.

  • Your own runner

    locus-runner runs the same tests on developer machines, inside private networks and in CI.

    The local runner

Pilot workspaces run tests through your own runner. Credential handling is on the security page.

Try resilient replay on your own staging app.

Locus is opening pilot access to a small group of engineering and QA teams.