Quantcast
Channel: Learning Selenium WebDriver » 09. Make your Tests Maintainable
Viewing all articles
Browse latest Browse all 5

Page Object Model – Introduction

$
0
0

Creating Selenium test cases can result in an unmaintainable project. One of the reasons is that too many duplicated code is used. Duplicated code could be caused by duplicated functionality and this will result in duplicated usage of locators. The disadvantage of duplicated code is that the project is less maintainable. If some locator will change, you have to walk through the whole test code to adjust locators where necessary. By using the page object model we can make non-brittle test code and reduce or eliminate duplicate test code. Beside of that it improves the readability and allow us to create interactive documentation. Last but not least, we can create tests with less keystrokes. An implementation of the page object model can be achieved by separating the abstraction of the test object and the test scripts.

This section of the blog will explain the common use of the page object model. We will make use of an Integrate Development Environment, called Eclipse.

The post Page Object Model – Introduction appeared first on Learning Selenium WebDriver.


Viewing all articles
Browse latest Browse all 5

Latest Images

Trending Articles





Latest Images