A design pattern to represent a web page as an object. Usually used in UI / end-to-end testing and browser automation.
A page object provides access to a web page. In its implementation, a page object typically makes use of a web driver like selenium-webdriver or protractor. The page object hides the html and web driver details, and provides an abstract interface to the page in terms of its application domain.
The page objects are subsequently used to create end-to-end test scenarios that click through the application. The use of page objects make these tests easier to maintain when details of the underlying pages change.
This tag can be used for questions on the design, implementation, and use of page objects for end-to-end testing of web applications.
More information:
- Martin Fowler's PageObjects page.
- The description of page objects on the Selenium wiki.
- The page object guidelines from Selenium's test design considerations.