Selenium WebDriver Architecture Framework Explained

In the previous post on Selenium Introduction of our Selenium Tutorial Series, we learned about the different components of the Selenium, its advantages, and its limitations. This tutorial is based on the main component of Selenium Test Suite i.e. Selenium Webdriver. Here, we will learn about the Selenium WebDriver architecture framework, its different components, and it’s functioning.

Selenium WebDriver Architecture

The knowledge of Selenium WebDriver architecture is required for an in-depth understanding of Web-UI automation using Selenium WebDriver. In order to understand the architecture, we first need to know about the four components that comprise this framework.

Selenium WebDriver Architecture Diagram

selenium webdriver architecture

Selenium Client Library

The developers of Selenium WebDriver have made it possible to support different programming languages. The Selenium Client Library or the language bindings component of the Selenium WebDriver architecture allows us to write the Selenium automation scripts in the language of our choice – Java, Python, C#, Ruby, Javascript, etc.

Browser Drivers

For each of the supported browsers in Selenium, we have a separate browser driver. These drivers take command from the selenium scripts and pass them to the respective browsers in order to automate the web application.

In this way, these browser drivers allow communication between the Selenium script with the different browsers without revealing the internal logic of those browsers.

Some of the browser drivers in Selenium are- FirefoxDriver, ChromeDriver, InternetExplorerDriver, SafariDriver, OperaBrowser, EdgeDriver, and HtmlUnitDriver.

JSON Wire Protocol over HTTP

The JSON or JavaScript Object Notation is a light-weight data format for storing and transferring data. The JSON wire protocol provides the capability of transferring data between the client and the server over the web.

In the WebDriver architecture, the JSON wire protocol is used for communication between the selenium scripts and the Browser Drivers.


This component of the Webdriver architecture in Selenium is pretty straightforward. The browsers receive the command and call the respective method to perform the desired automation task. The different browsers supported by Selenium are – Chrome, Firefox, IE, Edge, Safari, Opera, etc.

Automation using Selenium WebDriver Explained

Time to see the internal working of the automation of web applications in the different browsers using Selenium WebDriver. 

Let’s understand this with the help of the below commands to perform a simple automation task-

WebDriver driver = new FirefoxDriver();

Now, the script is written in Java, so the Selenium Client Library component helps us in creating the scripts in Java language. Using the JSON wire protocol, the Selenium client communicates with the browser driver (Firefox in case of our example) to perform the get() operation to launch the ArtOfTesting website and then click on a button.
The Firefox browser driver will then send the commands to the respective browser. On successful completion of the automation tasks, the response is sent back to the automation script.

This completes our tutorial on WebDriver architecture in Selenium. After this, you can now continue with the next chapter of our Selenium WebDriver Tutorial series i.e. Selenium WebDriver Setup to setup Selenium on your machine and test the setup with a sample script.

Leave a Comment