BDD with PageObject

How to adopt Page Object Pattern in BDD

In this chapter, we will see how to refactor the example in last chapter to use page object.

The reason why we need to use "Page Object" is for better reusability and maintainability. So basically, this part is more technical.

More over, we can separate Page Object into smaller pieces, such as fragements, to have more flexbility. Since the pattern is the same, we will just demostrate on page level.

For more content, you can refer to Martin Fowler's article: and the Page Object on Selenium's wiki: