Locus

Browser tests that recover without guessing.

Record a real workflow, refine the evidence, replay it in Playwright.

Recorded target, step 4 of checkout

button "Place order"

Inside
form#checkout
Next to
Order total
Position
Foot of the form
  1. Semantic 1 match getByRole('button', { name: 'Place order' })
  2. Stable attribute No match [data-testid="checkout-submit"]
  3. Relational 1 match form#checkout > button[type="submit"]
Click

Two strategies agree; position and neighbours match the recording.

If strategies disagree or match two elements, the step is Blocked, not guessed.

A replayed step after a release renamed the test id. An illustration.

From a real session to a test case

  1. Record

    Use your staging app with the snippet added. Locus captures what happens.

    click button "Place order"

  2. Refine

    Edit steps, promote observations to assertions, swap values for secrets.

    assert POST /api/orders status 201

  3. Replay

    Run it in Playwright, with every target verified before it acts.

    locus-runner run

How Locus works

Where record and replay usually breaks

  • DOM changes should not break your tests.

    Each target keeps independent locator strategies. Replay falls back to the ones that still resolve, verifies the element, and refuses an ambiguous match.

    Target resolution

  • Run tests where your application lives.

    locus-runner executes on your machines and in your CI, so it reaches staging behind your VPN with no inbound ports.

    The local runner

  • Stop logging in from scratch in every test.

    One sign-in test saves a Playwright storageState snapshot. The tests after it start signed in.

    Session snapshots

Where a test password goes

It is needed at one moment, in one place. Everywhere else it is a name or a mask.

Example: a sign-in test that uses the vault secret {{staging_admin_password}}. How Locus handles credentials
WhereWhat it holdsHow
The recordingMasked keystrokesThe snippet masks password fields and keeps them out of recording batches.
The test definition{{staging_admin_password}}Steps reference secrets by name, never by value.
The vaultCiphertextA per-site vault, encrypted with AES-256-GCM.
The browser at replayThe value, in memoryDecrypted for the run that needs it, injected as the step executes.
Captured network data[REDACTED]Credential fields are redacted, and auth headers dropped, before anything is stored.

Help build a more reliable way to replay browser tests.

Locus is opening pilot access to a small group of engineering and QA teams. Pilots run on staging sites with test data.