Tag Info

About

Further reading on Page Objects available below:

http://code.google.com/p/selenium/wiki/PageObjects

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

http://watirmelon.com/2012/06/04/roll-your-own-page-objects/

Taking it back to basics, essentially there are three functions I see a page object pattern provides:

  • Ability to easily instantiate pages in a consistent manner;
  • Ability to concisely describe elements on a page, keep it DRY by avoiding repetition of element identifiers (using the underlying
    driver’s API); and
  • Ability to provide higher level methods that use the elements to perform user oriented functions.
history | show excerpt | excerpt history