> For the complete documentation index, see [llms.txt](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimatewebsolutions.gitbook.io/qa-knowledge-base/test-automation/page-object-model-pom.md).

# Page Object Model (POM)

The **Page Object Model (POM)** is a design pattern used in test automation to **separate test logic from the details of the UI**.

Page Object Model is a design pattern used in test automation to encapsulate page locators and UI actions in separate classes. It makes tests more readable, maintainable and reusable. If a UI locator changes, I usually only need to update it in the corresponding Page Object rather than changing multiple tests.

### POM Structure

playwright\_project/\
│\
├── pages/\
│     ├── login\_page.py\
│     ├── home\_page.py\
│     └── checkout\_page.py\
│\
├── tests/\
│     ├── test\_login.py\
│     ├── test\_checkout.py\
│     └── test\_search.py\
│\
└── conftest.py
