Chapter 5. Using the Page Object Model

In this chapter, we will cover the following topics:

  • Using the PageFactory class for exposing the elements from a page
  • Using the PageFactory class for exposing an operation on a page
  • Using the LoadableComponent class
  • Implementing nested Page Object instances
  • Implementing the Page Object model in .NET
  • Implementing the Page Object model in Python
  • Implementing the Page Object model in Ruby by using the page-object gem

Introduction

Developing a maintainable automation code is one of the keys to a successful test-automation project. Test-automation code needs to be treated as production code and similar standards and patterns should to be applied while developing this code.

While developing Selenium WebDriver tests, we ...

Get Selenium Testing Tools Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.