Get the latest tech news
Page Object (2013)
A page object wraps an HTML page, or fragment, with an application-specific API, allowing you to manipulate page elements for testing without digging around in the HTML.
Page objects are a classic example of encapsulation - they hide the details of the UI structure and widgetry from other components (the tests). It's a good design principle to look for situations like this as you develop - ask yourself “how can I hide some details from the rest of the software?” As with any encapsulation this yields two benefits. Perryn Fowler, Pete Hodgson, and Simon Stewart gave particularly useful comments on drafts of this post - although as usual I owe much to various denizens of Thoughtworks's internal software development list for their suggestions and corrections.
Or read this on Hacker News