agents· 13 min read· by Pramod Dutta

Is the Page Object Model Dead in 2026?

Page object model is dead or evolving? A balanced 2026 guide to intent-based AI tests, POM maintenance, and scripted suite structure.

page object model is dead is a provocative search query, but the honest answer is more useful than the slogan. The page object model is not dead for every team. It is losing its monopoly over browser validation because AI agents can follow plain-English intent without a page object for every screen. BrowserBash leans into that shift: describe the objective, run it in a real browser, and use deterministic checks where correctness matters.

Why people ask if the page object model is dead

The phrase page object model is dead comes from a real frustration. Page objects started as a way to reduce duplication and hide selectors. In many suites they became a second application: classes for every page, helpers for every control, naming debates, stale methods, and reviews that spend more time on abstraction than user risk. When a product changes quickly, that maintenance tax can drown the value of the tests.

AI browser agents challenge the premise. If the test can say what the user wants and the agent can operate the browser, you do not need a page object just to click a button with visible text. You still need structure, but the structure can be around objectives, data, assertions, and results rather than every DOM path.

The honest answer is that page objects are not dead. They are no longer the only serious way to build browser validation.

BrowserBash and intent-based validation

BrowserBash is a free, open-source natural-language browser automation CLI from The Testing Academy, founded by Pramod Dutta and licensed under Apache-2.0. You install it with npm install -g browserbash-cli and run it with browserbash. The current version to write against is 1.5.1. Its positioning matters: it is the open-source validation layer for AI agents. You write a plain-English objective, an AI agent drives a real Chrome or Chromium browser step by step, and the run returns a deterministic verdict plus structured results. It is not a selector framework, and it does not ask you to maintain page objects before you know whether a flow is worth automating.

BrowserBash removes the selector-first step for many validation flows. You can ask it to sign in, update billing details, open a report, or verify a checkout state. The agent observes the real browser and acts step by step. The value is not magic. The value is shifting routine interaction maintenance away from page-object code and toward clearer user intent plus deterministic checks.

If you want the broader product map, the BrowserBash features page explains the CLI surface, the tutorial library has runnable flows, and the open-source repository is the place to inspect the Apache-2.0 project itself.

A comparison table

Dimension Page Object Model Plain-English AI validation
Main abstraction Classes or modules around pages and components User objectives and testmd files
Maintenance cost Selector updates, helper changes, step reuse review Prompt clarity, deterministic assertions, model choice
Best fit Large scripted suites with stable UI contracts Outcome checks, agent workflows, exploratory validation, fast coverage
Failure evidence Test runner stack trace and browser artifacts Structured verdict JSON, assertions, Result.md, NDJSON events
Not ideal when The UI changes constantly and page objects become busywork You need typed helper APIs for thousands of scripted interactions

Where page objects still help

POM still helps when you own a large scripted Playwright, Selenium, or Cypress suite with stable UI contracts and many repeated interactions. Typed helper methods, component objects, and shared navigation helpers can keep code organized. If your team is already good at maintaining them and failures are clear, do not rip them out for fashion.

Page objects also help when you need low-level precision: drag-and-drop internals, canvas controls, complex file upload widgets, or flows where selectors are the most reliable contract. AI can operate many UIs, but it is not a substitute for a precise scripted harness in every case.

The better question is which tests deserve code-level abstraction and which deserve intent-level validation.

Where AI tests remove POM maintenance

AI tests shine when the product flow is important but the UI is changing often. Early onboarding, admin tools, internal dashboards, and release smoke checks often need coverage before the UI architecture settles. Writing a full page object model too early can slow the team down. A BrowserBash objective plus Verify assertions can protect the outcome while the interface evolves.

browserbash import tests/playwright --output tests/browserbash

browserbash run "Sign in as a saved user, update the billing address, and verify the new city appears on the profile" --auth user1 --agent

The import command gives existing Playwright teams a bridge. It converts common Playwright actions and expects to plain-English *_test.md files without a model. Untranslatable pieces go to IMPORT-REPORT.md, which is safer than pretending the conversion was complete.

The new structure: files, imports, variables, assertions

Plain-English does not mean unstructured. BrowserBash markdown tests are committable *_test.md files. They support @import composition and {{variables}} templating. Secret-marked variables are masked in every log line. Result.md gives a human-readable run record, and --agent emits NDJSON for tools. This is structure around behavior rather than classes around pages.

The newer deterministic Verify assertions are the guardrail. In testmd v2, a Verify line that matches the grammar compiles to a real Playwright check for URL contains, title is or contains, text visible, a named button, link, or heading visible, element counts, or a stored value equals. That is not model judgment. A pass means the condition held in the browser, and a fail carries expected-versus-actual evidence in run_end.assertions and the Result.md assertion table. Verify lines outside the grammar can still run, but they are marked judged: true, so you can separate deterministic checks from agent-judged observations.

cat > tests/users_flow_test.md <<'EOF'
---
version: 2
auth: admin
---
POST https://api.example.com/users with body {"name":"bb-{{RUN_ID}}"}
Expect status 201, store $.id as 'usersId'

Open https://app.example.com/users/{{usersId}}
Verify URL contains dashboard
EOF

browserbash run-test tests/users_flow_test.md --agent

MCP changes the audience

Version 1.5.0 added an MCP server through browserbash mcp. It serves the CLI over stdio and exposes run_objective, run_test_file, and run_suite. Each tool returns verdict JSON with status, summary, final_state, assertions, cost_usd, and duration_ms. A failed validation is not a crashed tool call. The tool succeeds and the calling agent reads the failed verdict, which is the right shape for agent workflows.

The MCP server makes BrowserBash useful as a validation tool for AI coding agents. An agent can change code, call run_objective or run_test_file, and read the structured verdict. It does not need to parse a stack trace from a page-object suite unless that suite is the right tool for the job. This is one reason the page object model is dead question keeps coming up: the consumer of the test is increasingly another agent, not only a human engineer.

Decision section: keep, replace, or mix

Keep page objects for stable scripted suites with lots of reuse, precise UI contracts, and engineers who maintain them well. Replace page-object-heavy smoke flows with BrowserBash when the purpose is to validate outcomes and the selector layer creates more maintenance than confidence. Mix both when the same product has mature core flows and fast-changing edges.

A practical migration path is to leave the existing POM suite alone, import or rewrite a small smoke set into BrowserBash, and compare failure quality for a month. If the intent-based tests catch useful regressions with less maintenance, expand. If they are vague or flaky, improve assertions, data, and model choice before expanding further.

Caveats for 2026

The model story is deliberately local-first. BrowserBash defaults to Ollama, so a team can start with free local models, no API keys, and no test prompt leaving the machine. Provider resolution then falls through to ANTHROPIC_API_KEY, OPENAI_API_KEY, and OpenRouter when you bring your own keys. For long, sensitive, or regulated flows, that default is useful. The honest caveat is that very small local models around 8B parameters and under can be flaky on long multi-step objectives. The sweet spot is usually a mid-size local model, such as a Qwen3 or Llama 3.3 70B-class model, or a capable hosted model for hard flows.

For suites, run-all is memory-aware. It derives concurrency from real CPU and RAM, orders previously-failed and slow tests first, and reports flaky behavior. Version 1.5.0 added budget controls: run-all --budget-usd 2.50 or --budget-tokens stops launching new tests after the budget is crossed, reports the rest as skipped, exits 2, and writes spend into RunAll-Result.md and JUnit properties. Sharding through --shard 2/4 uses sorted discovery order, so CI machines agree without coordination.

For setup-heavy flows, remember that testmd v2 currently needs the builtin engine with Anthropic credentials or a compatible gateway. That limitation matters if your team is strictly Ollama-only today. The product is open source, so you can inspect the implementation in the GitHub repository and follow updates through the BrowserBash blog.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

Implementation checklist for page object model is dead

A final practical rule: keep the first version small, inspect the evidence, and only then expand the suite. BrowserBash works best when objectives are specific, data is controlled, and the pass or fail claims are explicit. That habit matters more than the number of tests you create in the first week.

FAQ

Is the page object model dead in 2026?

No, not universally. The page object model is less central for intent-based AI validation, but it still helps large scripted suites that need shared selectors, typed helper methods, and strict code review around UI contracts.

What replaces page objects in AI browser testing?

Plain-English objectives, deterministic Verify steps, saved auth, API setup, and structured verdicts replace much of the page object maintenance for validation flows. The goal moves from modeling every page to proving user outcomes.

When should teams keep page objects?

Keep page objects when your suite is mostly scripted, your team wants compile-time structure, or repeated low-level interactions need precise reuse. POM can still be the right choice for stable, high-volume automation maintained by engineers.

Can BrowserBash import existing Playwright tests?

Yes. BrowserBash import converts Playwright specs to plain-English test files heuristically without a model. Anything it cannot translate is reported in IMPORT-REPORT.md rather than silently dropped.

Start locally with npm install -g browserbash-cli, then explore the optional BrowserBash sign-up path if you want the free cloud dashboard. An account is optional for local CLI validation, so you can try the workflow before connecting anything.

Try it on your own appnpm install -g browserbash-cli
Start learning