I will not venture a claim that the implementation of the Page Objects in this chapter is the right and only way to do it. Just like there are many programming languages and different ways to write code, there are multiple ways to implement Page Objects. Choosing the right approach will be one of the first and most difficult tasks to figure out. I'd like to spend this section talking about different approaches we could have taken when writing our framework.
In the framework we implemented, the
@selenium instance is passed between different
Page objects as the test progresses. For example, after we have created an instance of Firefox browser with WebDriver, we pass it into each ...