Skip to main content
Tool comparison
COMPARE  /  page-object-model-vs-screenplay-pattern

Page Object Model vs Screenplay Pattern

The Page Object Model puts each page in a class that owns its locators and exposes user actions, so a UI change is fixed once. The Screenplay Pattern models actors who perform tasks made of interactions and ask questions, composing behaviour instead of inheriting it. Choose page objects for most suites; choose Screenplay once page objects become god classes.

Page Object Model
A design pattern where each page or component of the application is a class that owns its locators and exposes the actions a user can take there.
Screenplay Pattern
A design pattern where actors with abilities perform tasks composed of interactions and ask questions about the application's state.

How do Page Object Model and Screenplay Pattern compare?

Page Object Model vs Screenplay Pattern, compared by dimension
Unit of organisationPage Object ModelThe page or component: one class per screenScreenplay PatternThe actor and the task: what a user is trying to do
How behaviour is builtPage Object ModelMethods on the page class; reuse through inheritance and helper classesScreenplay PatternComposition: tasks made of smaller tasks and interactions, run with actor.attemptsTo(...)
Where assertions livePage Object ModelIn the test, never in the page object, apart from checking the page loadedScreenplay PatternIn the test, as questions the actor asks about the application state
Readability of a testPage Object ModelReads as a sequence of page interactionsScreenplay PatternReads as a business narrative: who does what to achieve which goal
Learning curvePage Object ModelLow; the pattern most tutorials and teams already useScreenplay PatternHigher; more classes and concepts before the first test runs
Failure modePage Object ModelPage classes grow into thousand-line god objects mixing navigation, actions and dataScreenplay PatternOver-abstraction: a task for every click and a class explosion nobody wanted
ToolingPage Object ModelSupported everywhere; Selenium's docs describe it and Playwright fixtures fit itScreenplay PatternSerenity BDD and Serenity/JS provide the pattern as a library for Java and JavaScript
Interview expectationPage Object ModelExpected knowledge for any automation roleScreenplay PatternBonus knowledge; mostly asked in BDD-heavy or Serenity-based teams

When should you choose Page Object Model, and when Screenplay Pattern?

Choose Page Object Model when

  • The suite is small to medium and a class per page keeps it navigable.
  • The team knows the pattern and the tooling, tutorials and hiring pool assume it.
  • You are using Playwright or Cypress, whose fixtures and commands already keep tests short.
  • You want the lowest barrier for new joiners to write a test.

Choose Screenplay Pattern when

  • Page objects have become large, duplicated and hard to change safely.
  • Tests should read as user goals for business stakeholders, especially alongside Cucumber.
  • The same steps are reused across many user journeys and composition beats inheritance.
  • The team uses Serenity BDD or Serenity/JS, where the pattern is provided rather than hand-built.

How does Page Object Model vs Screenplay Pattern come up in QA interviews?

Framework design questions separate candidates who have maintained a suite from those who have only added tests to one. The interviewer wants to hear the failure mode of page objects from experience, and a judgement about when the extra structure of Screenplay is worth its cost.

  1. 01Describe the Page Object Model and the rule about assertions. Why does that rule exist?
  2. 02Your page objects have grown to 1,500 lines each. What went wrong, and would Screenplay have prevented it?
  3. 03Explain actors, abilities, tasks, interactions and questions with a login example.
  4. 04How would you introduce Screenplay into an existing page-object suite without a rewrite?
Answer 2 Free Questions

No account needed · Scored in under a minute against a senior rubric

Common questions about Page Object Model vs Screenplay Pattern

Is the Page Object Model still relevant?

Yes. It remains the default structure for most automation suites, is described in Selenium's own documentation, and maps naturally onto Playwright and Cypress projects. Its weaknesses appear at scale, when page classes accumulate unrelated responsibilities; that is the problem Screenplay was proposed to solve.

Is Screenplay a replacement for page objects?

It is an alternative that grew out of the page object idea. Screenplay keeps locators and low-level interactions but organises tests around actors and tasks composed from smaller parts, rather than around pages. Many Screenplay codebases still keep a lightweight page or component layer for locators.

Which tools support the Screenplay Pattern?

Serenity BDD provides Screenplay for Java, working with JUnit 4 and 5 and with Cucumber, and Serenity/JS provides it for JavaScript and TypeScript, integrating with test runners such as WebdriverIO. You can hand-build the pattern in any language, which is how it started.

Which should I learn for QA interviews?

The Page Object Model, thoroughly, including the assertion rule and how methods return other page objects. Read about Screenplay so you can explain actors, tasks and questions and say when you would reach for it; being able to describe its trade-offs is what senior interviews reward.

EXEC.NOW

Ready to be asked about Page Object Model or Screenplay Pattern?

Practice explaining the trade-off to an interviewer who knows both.

Join 500+ QA engineers already practicing with AssertHired.

Question 1 · Automation · Mid-levellive scoring

A test passes locally but fails in CI about one run in five. Walk me through what you check first, and why.

Scored on the same four dimensions as the real thing: Technical accuracy · Coverage · Clarity · Best practices.

Rather skip ahead? Create a free account

FREE.TO.START  ·  7.DAY.TRIAL ON PAID PLANS
Written by , Senior QA Automation Engineer, 50+ QA candidate interviews conductedLast updated July 2026