Selenium Framework

Introduction to Framework :

A test automation framework is an integrated set of technologies, tools, processes and patterns brings organization of thought and clarity thereby simplifying and enabling a team perform Automation not only effectively but also efficiently.

framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, image files, localized strings, header files, and reference documentation, in a single package. There are various frameworks available for automation, such as:

  • Modular Framework
  • Keyword-Driven Automation Framework
  • Data-Driven Automation Framework
  • Page Object pattern
  • Hybrid Automation Framework

Modular Framework

The main advantage of Page Object Model is that if the UI changes for any page, it don’t require us to change any tests, we just need to change only the code within the page objects (Only at one place).

Keyword-Driven Automation Framework

Keywords are essentially blocks or functions that are named so that they can be consumed for a given functionality.

In this framework, keywords are developed which are equal to a unit level functionality. It is an independent framework which perform automation based on the keywords specified in the excel sheet. Based on the type of application, the number of keywords will be increased to handle different functionalities.


  • High re-usability can be achieved by re-using across multiple test cases.
  • Maintainability is easy which doesn’t require any Automation expertise.
  • Debugging is easy.


  • Requires a complicated framework than the data driven framework.
  • Test cases grow longer and complex and this is due to the greater flexibility

 Data-Driven Automation Framework

In this methodology, test data is separated from test scripts and results are returned against the test data. And finally if all the test data combinations are pass, then only the test case is treated as “PASS”. If any one of the test data combination is failed, then the entire test case will be treated as “FAIL”


  • It is suitable for test cases with multiple test data combinations.
  • It reduces the number of test scripts needed to implement all the test cases.


  • It is not suitable for test cases having very simple actions which doesn’t include any test data.

Page Object Pattern

If you think of a web based application as a network of pages that interact with each other AND there are large number of pages in your application that can change nature frequently, this pattern is the most favourable one to use.

Page-objects (or classes) are defined for each page, where a page contains the html locator information and also the methods that can operate on those page elements.

The concept of page object is to be able to have the element initialized by the time we want to interact with it, so that we don’t have to dig into the DOM every time we need to interact with it.

Hybrid Automation Framework

This framework is the combination of both data-driven and keyword driven testing frameworks. It allows data driven scripts to take advantage of the powerful libraries and utilities in a keyword based approach.


The Hybrid framework is build with a number of reusable modules / function libraries that are developed with the following features in mind:

  • Maintainability – Hybrid framework significantly reduces maintenance effort
  • Re-usability – It allows to reuse test cases and library functions
  • Manageability – effective test design, execution, and traceability
  • Accessibility – easy to design, develop, modify and debug test cases while executing
  • Availability – Allows to schedule automation execution
  • Reliability – due to advanced error handling and scenario recovery
  • Flexibility – framework independent of system or environment under test
  • Measurability – customizable reporting of test results ensure the quality output

About samp79

Professional Automation Tester
This entry was posted in Framework, Selenium, Test Automation. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s