Selenium WebDriver: Page Object Pattern and PageFactory
How does it work?
Page Object Pattern is a pattern that displays user interface as a class. In addition to user interface, functionality of the page is also described in this class. This provides a bridge between page and test.