Selenium/Explanation/Page object pattern

There are two main purposes of the page object pattern.


 * Move parts of the application that change a lot (user interface) to a central location. When the user interface changes, the test suite only needs to be updated in one place.
 * Make tests easier to read and understand by moving complexity to page objects.

Let's describe the purposes with code samples from MediaWiki Core (as of June 2021).

user.js file contains a test for creating account.

More information

 * PageObject by Martin Fowler (2013)
 * PageObjects by Simon Stewart (Selenium, 2015)
 * Page object models by Diego Molina (Selenium, 2019)
 * Page Object Pattern by Christian Bromann (WebdriverIO, 2021)
 * Selenium/Explanation/Stack
 * Selenium/Reference/Stack