Expert Level Selenium Framework 2021

In this tutorial, we will learn exhaustively about the Test Automation framework and design and develop the Selenium framework from scratch to the advanced level.

Let’s break this series of tutorials into multiple modules to accomplish the Selenium Framework Development with Java from concept to advanced level.

Types of the Selenium Framework and their Features

Different types of Selenium Framework are designed and built considering the Application needs that you want to automate. Every different type of test Automation framework is having different features and advantages/disadvantages.

We can classify the Selenium Framework in the below areas :

Test Automation Selenium Framework Features

Keyword Driven Framework in Selenium

What is keyword driven framework?

Keyword Driven Framework in selenium is a Selenium framework built around the feature or design where the Keyword drives the framework; we will see how. 

How Keyword Driven framework Works : 

As mentioned above, KDF is dependent or designed based on Keywords, So what is a keyword? 

Keywords are nothing but the web action words (like click, type, mouseHover, switchFrame etc. ), now you store these keywords in Some repo (or let’s say in Excel files) and for all the keyword’s actions you define a class (which is WebAction utility using Selenium commands ) and write specific methods for Specific Keywords.

Now the next step is basically from your script when you mention let’s say click on some webelement then, in that case, the respective operation goes to the Keyword’s repo (here in our case Excel and then depending on the operation it calls the respective methods which you had defined in the class ).

Additionally, You have different reporting mechanisms (let’s say reportNg or Allure report ) which you can integrate with your Selenium framework to take care of the reporting.

keyword driven framework advantages

keyword driven framework disadvantages 

Data driven framework in Selenium 

What is Data driven framework?

Data Driven framework in selenium is a type of Selenium framework which is built around the feature or design where the data drives the framework; we will see how :

How Data Driven framework Works

Data Driven Framework is designed to handle complex and various type of Data to perform the Automation of the application.

This kind of framework is useful and built where your automation scenarios and use cases must be tested with various sets of data on the same functionalities.

So Data drives the flow of Automation where same test scenarios are tested with respect to different data sets, and DDF should be able to handle various types of Data such as Excel, CSV, YML, PDF, Text, DataBase, Image Data etc.

So you can use TestNG data provider, TestNG XML parameterized Data, JDBC connection manager, PDF data handler, YML data handler. 

You can use Tesseract OCR for working with image data handling.

Data driven framework advantages 

Data driven framework disadvantages

 

Hybrid framework in Selenium Automation

What is Hybrid framework?

Hybrid framework in selenium is a type of Selenium framework which basically is built around the feature or design by taking the concept of both Keyword driven and Data driven framework. 

So, 

Hybrid Framework => Data Driven Framework + Keyword Driven framework.

How Hybrid Framework Works

The hybrid framework supported and driven by Keyword Driven approach with the capability to handle Data driven testing, so both the features are enabled with Keywords repository and their implementation and along with Various Data providers and Dala handlers which is the core feature of the Data Driven Framework.

Page Object Model – Test Automation framework

What is Page Object Model 

Page Object Model framework as the name suggests, is basically a Selenium framework design and developed around the below features and concepts :

Why Page Object Model || Advantages of a page object model

Page Object Model framework design is one of the latest framework model used in the industry, and it comes up with various advance features along with it  

We will see how to design the exhaustive Page Object Model framework here.

Hybrid Page Object Model Selenium framework

Hybrid Page Object Model framework is designed with an approach where its the combination of Data driven Framework and Page Object Model framework.

Here in the Hybrid Page Object Model framework, the Core Design is based on the Page Object model and uses the vast data handler to work with Data-Driven Testing.

We will Design the Hybrid Page Object model Framework here. 

Behavior driven development (BDD) Test Automation framework 

BDD framework is a Selenium framework where the design and the flow of Automation are driven by the behaviour.

What is BDD framework? 

BDD framework is controlled or designed based on the behaviour of the test cases or actions performed. 

In BDD framework, we use English like language called Gherkin language, which is the driving point of the framework. 

Gherkin language is basically in the format of given, when, then (where given narrates a precondition when means when you perform some operation on some webelement like let’s say click operation etc. and then is basically for assertion )

Tools and Technologies required for the Automation Framework

Selenium is an open-source tool, and it does not provide any inbuilt framework along with. Hence you need to design and develop the Selenium framework along with Tools and technologies. 

You could use the tools to work with Selenium framework Development

These are the majorly and frequently used Tools and tech stack to build a robust Selenium framework. 

Conclusion: This tutorial We had an overview of the Selenium Automation framework and what are features of a Selenium framework and what tools are required to build a Robust Test Automation Framework, in the upcoming tutorials we will discuss about the Design Principles and design patterns to build a Selenium framework and eventually we will end up creating a framework hands on which you could use at your own approach. To learn about the whole Selenium tutorial you can visit here and for Critical Selenium Interview Questions click here.

Leave a Comment