<commit_before>---
layout: pattern
title: Page Object
folder: page-object
permalink: /patterns/page-object/
categories: Testing
tags:
- Testing
- Web Development
- Encapsulation
---

## Intent

Page Object encapsulates the UI, hiding the underlying UI widgetry of an application (commonly a web application) and providing an application-specific API to allow the manipulation of UI components required for tests. In doing so, it allows the test class itself to focus on the test logic instead. 


![alt text](./etc/page-object.png "Page Object")
<commit_msg>Add some tags to Page Object<commit_after>---
layout: pattern
title: Page Object
folder: page-object
permalink: /patterns/page-object/
categories: Testing
tags:
- Java
- Difficulty-Intermediate
- Testing
- Web Development
- Encapsulation
---

## Intent

Page Object encapsulates the UI, hiding the underlying UI widgetry of an application (commonly a web application) and providing an application-specific API to allow the manipulation of UI components required for tests. In doing so, it allows the test class itself to focus on the test logic instead. 


![alt text](./etc/page-object.png "Page Object")

{'fraction_non_alphanumeric': 0.0781786941580756, 'fraction_numerical': 0.0, 'mean_word_length': 4.368663594470046, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4188120', 'n_tokens_mistral': 313, 'n_tokens_neox': 300, 'n_words': 147}