O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

We learnt a lot in this chapter about design patterns that we can use with Selenium WebDriver. We have learnt techniques that allow us to build test projects that are easy to maintain and readable by all users.

Specifically, we covered:

  • Page Objects: This is a technique where we split the test logic out into separate classes. This allows us to create a Java class for each of the pages that we use on the page.
  • Page Factory: This allows us to decorate our WebElement variables in our Page objects so that we remove a lot of the look up code. We learnt that the elements get initialized when we call PageFactory.initElements(); in our tests or anything else that may use that code.
  • LoadableComponent: In this section we had a look at the base page ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required