Browsed by
Tag: pageobject

PageObject use – is it rewarding?

PageObject use – is it rewarding?

In this post, I want to show you the principles of the most useful pattern for end-to-end testing. I will use Selenium for all examples. I assume that you know this tool. It would be easier to explain some things.

Selenium WebDriver gives us powerful tools for writing end-to-end tests. We can imitate the user behavior on every aspect. However, it doesn’t come without some pain. It has several problems that testers must deal:

PageObjects generators

PageObjects generators

Today I want to show you the method to minimize the initial amount of work. When we decide to use Page Objects pattern in our test code, we should map our web application pages to classes. It is not a creative task. That’s why we can try to automate it. By the definition of Page Object, we should take HTML structure and find all significant places and create class members for them. It sounds easy, but it may raise some problems. There are few different tools to generate Page Objects. We can notice two approaches among them.