Selenium WebDriver and its Architecture

In this lesson, we will walk you through Selenium and its components including WebDriver.

What is Selenium? #

Selenium is a suite of tools that helps you to automate cross-browser testing for a web-based application.

Selenium components #

The Selenium comprises of these main components:

  • Selenium WebDriver - is a collection of open-source APIs that helps in simulating user flows for any web-based application
  • Selenium IDE - is a browser add-on that helps you to create tests quickly through its record-and-playback functionality.
  • Selenium Grid - helps you in executing tests in parallel across different browsers, operating systems, and machines

Selenium WebDriver #

WebDriver is a web framework that helps you execute cross-browser tests; it uses browser automation APIs provided by browser vendors such as Firefox, Chrome, Safari, Microsoft Internet Explorer, Microsoft Edge, Opera, etc., to interact with the browser and simulate user actions. It supports different programming languages and allows you to write the test scripts in your choice of language. Additionally, it uses the JSON wire protocol over HTTP to interact with browser drivers.

WebDriver architecture #

Interaction of the Selenium client library with the real browser is shown below.

Selenium WebDriver Architecture
Selenium WebDriver Architecture

Selenium client library is available in multiple programming languages including JAVA, C#, Python, Ruby, Javascript. Few more programming languages that are not maintained by Selenium can be found here.

These client libraries interact with the browser driver executables using JSON wire protocol over HTTP which passes the action and arguments to initiate user actions, which will be simulated on the real browsers.

That was just the introduction on how Selenium WebDriver works. In the next lesson, we will learn about the basics of an automation framework design.