BP30: Use PageObjects Pattern

Create one class for each screen of your application. This class will then expose actions available on the screen. And it will encapsulate logic for finding controls and elements on the page. Such page can be easily reused on multiple places of the testing code.

Pros

  • Clean separation between test code and page logic
  • Page actions and controls can be easily consumed 
  • More robust and reliable, less fragile tests
  • Better maintenability of the tests
  • Bette reusability of the logic
  • Code duplication doesn't happen

Comments

No Comments Yet.
Be the first to tell us what you think.

Download Better Coder application to your phone and get unlimited access to the collection of enterprise best practices.

Get it on Google Play