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
-
Semantic
1 match
getByRole('button', { name: 'Place order' }) -
Stable attribute
No match
[data-testid="checkout-submit"] -
Relational
1 match
form#checkout > button[type="submit"]
Two strategies agree; position and neighbours match the recording.
If strategies disagree or match two elements, the step is Blocked, not guessed.
From a real session to a test case
-
Record
Use your staging app with the snippet added. Locus captures what happens.
click button "Place order" -
Refine
Edit steps, promote observations to assertions, swap values for secrets.
assert POST /api/orders status 201 -
Replay
Run it in Playwright, with every target verified before it acts.
locus-runner run
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.
-
Run tests where your application lives.
locus-runnerexecutes on your machines and in your CI, so it reaches staging behind your VPN with no inbound ports. -
Stop logging in from scratch in every test.
One sign-in test saves a Playwright
storageStatesnapshot. The tests after it start signed in.
Where a test password goes
It is needed at one moment, in one place. Everywhere else it is a name or a mask.
| Where | What it holds | How |
|---|---|---|
| The recording | Masked keystrokes | The 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 vault | Ciphertext | A per-site vault, encrypted with AES-256-GCM. |
| The browser at replay | The value, in memory | Decrypted 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.