What Is Page Object Model (POM)?
The Page Object Model (POM) is a design pattern in test automation where each web page or component is represented by a class that encapsulates its elements and interactions, separating test logic from UI details.
Free to start · 7-day trial on paid plans
In Depth
Without POM, test scripts directly reference locators and UI actions, creating duplication across tests. When a UI element changes, you update every test that touches it. POM centralizes page elements and actions in one class per page. Tests call high-level methods like loginPage.signIn(email, password) instead of repeating find-element-click-type sequences.
A well-designed Page Object exposes methods that represent user actions (fillEmail, submitForm, getErrorMessage), hides locator strategies and implementation details, returns other Page Objects for navigation (clicking "checkout" returns a CheckoutPage), and avoids assertions inside Page Objects, keeping them in the test layer.
POM scales through composition. Complex pages can delegate to Component Objects (e.g., a NavBar component used across multiple Page Objects). For single-page applications with dynamic content, some teams adopt the Screenplay pattern or App Actions pattern, but POM remains the most widely used and interview-relevant pattern.
Why Interviewers Ask About This
POM is the most-asked design pattern question in SDET and automation interviews. Interviewers want to see that you write maintainable, DRY test code, not throwaway scripts.
Example Scenario
A LoginPage class has methods enterEmail(email), enterPassword(password), and clickSignIn() that return a DashboardPage. When the dev team changes the Sign In button from a <button> to an <a> tag, only the LoginPage class needs updating. All 30 tests that use it continue to pass without modification.
Interview Tip
Be ready to code a simple Page Object on a whiteboard. Show that methods return Page Objects for chaining, and explain why you keep assertions in the test layer rather than the Page Object.
Related Terms
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Ready to Ace Your QA Interview?
Practice explaining page object model (pom) and other key concepts with our AI interviewer.
Join 1,200+ QA engineers already practicing with AssertHired.
Start Your Free QA InterviewFree to start · 7-day trial on paid plans