# Recorded vs handwritten browser tests

> Compare recorded and handwritten tests after a user interface change. Inspect locator durability, fixture isolation and the assertion against the saved order.

Source: https://cueapril.com/compare/recorded-vs-handwritten-browser-tests
Updated: 2026-12-01
Index: https://cueapril.com/llms.txt

## How much rework will each browser test need after the page changes?

Record a journey when you need to capture the sequence quickly or learn how a runner locates elements. Write or edit the test deliberately when it needs stable fixtures, reusable setup and a business assertion. The maintainable result can start either way.

Compare recorded and hand-written browser tests after a UI change. Judge locator durability, fixture isolation and the check on the resulting order.

Cue April editorial assessment. The sources identify documented capabilities. Suggested pilot checks are evaluation criteria.

## Record one journey and challenge its meaning

Start with an empty cart, add the £12 item and confirm the order. Read the generated code. Does it assert the item, amount and resulting order ID, or only record clicks? Playwright’s generator can produce assertions when you request them. Add an independent check of the final state and remove accidental steps such as opening the wrong menu.

Recorded vs. hand-written browser tests

| Decision | Recorded starting point | Hand-written starting point |
| --- | --- | --- |
| Initial path | Capture real actions and inspect suggested locators. | Name the user intent and select each target explicitly. |
| Data setup | Replace incidental cart contents with a fixed fixture. | Seed the same item and reset after the run. |
| Expected outcome | Add a recorded or edited assertion of the paid amount. | Write a named assertion from the independent price rule. |
| Maintenance trial | Review generated code after a layout change. | Review locator scope and readability after the same change. |

## Change the page without changing the order

Move the checkout control into a new container while preserving its accessible role and name. Then give two products similar controls. Compare edits needed by both versions and whether either selected the wrong product. Keep the version another engineer can diagnose from its failure message, even if its original authoring method changes little.

## Primary documentation

- [Playwright test generator](https://playwright.dev/docs/codegen)
- [Playwright locators](https://playwright.dev/docs/locators)

By Cue April. Updated 2026-12-01.

## Related

- [Testing comparisons](https://cueapril.com/compare): Compare testing tools and methods against a release decision. Inspect the required evidence, maintenance work and checks each approach can provide.
- [Playwright testing](https://cueapril.com/testing/playwright-testing): An AI testing agent runs your approved Playwright tests and keeps the results, source identity and gaps. Review accessibility scans alongside journeys.
- [Regression testing](https://cueapril.com/guides/regression-testing): What regression testing means, with examples, and how to automate it with scheduled runs, watched branches and approved checks across test methods.
