POM in Selenium means Page Object Model , a design pattern that keeps your test code clean by separating page elements and actions from test logic.

Quick Scoop

In POM, each web page is represented by a class, and that class stores the locators and methods for interacting with that page.

Your test scripts then call those methods instead of directly handling every element, which makes the code easier to read, reuse, and maintain.

Why it matters

  • Less duplicate code. You define locators and actions once and reuse them across tests.
  • Easier maintenance. If the UI changes, you usually update only the page class, not every test.
  • Better readability. Test cases look more like business steps than low-level Selenium commands.

Simple example

If you have a login page, you might create a LoginPage class with methods like:

  • enterUsername()
  • enterPassword()
  • clickLogin()

Then your test calls those methods instead of writing all the element-finding code directly.

In one line

POM is a way to structure Selenium automation so your tests are modular, reusable, and easier to manage.

If you want, I can also show you a small Java Selenium POM example.