Selenium Webdriver Appium Complete TutorialSelenium Webdriver Appium Complete Tutorial
Automation Testing
  • Tools
    • Selenium
      • Selenium Java Tutorial
      • Selenium C# Tutorial
    • Appium
      • Appium Java Tutorial
      • Appium C#Tutorial
    • Katalon
  • Trainings
  • TestNG
  • Reports
    • Extent Reports
      • Extent Reports – Java
      • Extent Reports – Java -Version3
      • Extent Reports – C#
    • Vigo Reports
    • AT Excel Report
  • Excel
    • Apache POI – Java
    • Excel With C#
  • Interview Questions
    • Selenium Interview Questions
    • Java Interview Questions
    • C# Interview Questions
  • Demo Site
  • Practice Site
  • More…
    • AutoIt
    • Sikuli
    • Robot Class
    • File Upload
    • ScreenShot
      • AShot
      • ShutterBug
  • About
December 10, 2016

Selenium WebDriver Architecture





Selenium Webdriver architecture will discuss about how the selenium webdriver will work. It is very important and mandatory that we should know the architecture of the tool which we are going to use. So, in this blog we will discuss about the selenium webdriver architecture.

Below is the diagram for the selenium architecture:

Webdriver Architecture

In the above diagram we can see these sections:

  1. Language Bindings
  2. Webdriver API
  3. Webdriver SPI
  4. JSON Wire Protocol
  5. Browsers Drivers

Language Bindings:

Here we can see that so many language bindings, which are used to implements/develop the selenium webdriver code. Using this code these will interact with the Webdriver. All the language bindings will have same kind of API, so, we have common set of commands to work with.

Webdriver API:

By using language binding commands webdriver will translate to the SPI, which is stateless.

Webdriver SPI:

When code enters the Stateless Programming Interface or SPI, it is then called to a mechanism that breaks down what the element is, by using a unique ID, and then calling a command that is relevant. All of the API calls above then call down.

From there we call the JSON Wire protocol. We still use HTTP as the main transport mechanism. We communicate to the browsers and have a simple client server transport architecture the WebDriver developers created the JSON Wire Protocol.

JSON Wire Protocol:

The WebDriver developers created a transport mechanism called the JSON Wire Protocol. This protocol is able to transport all the necessary elements to the code that controls it. It uses a REST like API as the way to communicate.

Browser Drivers:

Here we can see so many browsers like Firefox Browser, Chrome Browser, Opera Browser and IE Browser etc. Each browser will contain separate driver. When it received the command from the webdriver it will execute the command on the respective browser and it will give the response back in the form of HTTP Response.




Points to Remember:

  1. For each language binding command, one HTTP request is created and send it to the browser driver.
  2. The Webdriver API translates to SPI
  3. It is then called to a mechanism that breaks down what the element is, by using a unique ID, and then calling a command that is relevant.
  4. JSON wire protocol is able to transport all the necessary elements to the code that controls it.
  5. When it received the command from the webdriver it will execute the command on the respective browser and it will give the response back in the form of HTTP Response.

Please watch the YouTube video for this blog for better understanding.



Share this post: on Twitter on Facebook

Basic HTML Knowledge for Selenium Webdriver Selenium WebDriver Locators

Related Posts

TAKING WEB ELEMENT SCREENSHOT IN SELENIUM

Selenium - Java

How to Capture WebElement Screenshot in Selenium Webdriver using selenium 4

avoid Switch to window

Selenium - Java

How to Avoid Switch To Window in Selenium WebDriver

webdrivermanager

Selenium - Java

No More Driver EXE files for Selenium Execution – Instead Use WebDriverManager

HANDLE TEXTBOXES IN SELENIUM

Selenium - Java

Handling Textboxes in Selenium

JAVASCRIPTEXECUTOR IN SELENIUM

Selenium - Java

JavaScriptExecutor in Selenium

ELEMENT NOT VISIBLE EXCEPTION

Selenium - C#, Selenium - Java

Selenium ElementNotVisibleException

NOSUCHWINDOW EXCEPTIONS

Selenium - C#, Selenium - Java

Selenium NoSuchWindowException

NOSUCHFRAME EXCEPTIONS

Selenium - C#, Selenium - Java

Selenium NoSuchFrameException

NOSUCHELEMENT EXCEPTION

Selenium - C#, Selenium - Java

Selenium NoSuchElementException

SELENIUM WEBDRIVER EXCEPTIONS

Selenium - C#, Selenium - Java

Selenium WebDriver Exceptions

Newsletter

Recent Posts

  • TAKING WEB ELEMENT SCREENSHOT IN SELENIUMHow to Capture WebElement Screenshot in Selenium Webdriver using selenium 4
    December 15, 2019
  • How To SWAP Two Numbers in Java Without using Temp VariableHow to SWAP Two Numbers in Java Without Temp variable or Without Third variable
    December 8, 2019
  • How to Swap Two Numbers in Java with Temp VariableHow to SWAP Two Numbers in Java using Temp Variable
    December 1, 2019
  • How to Read Properties file in JavaHow to Read Data From Properties File in Java
    November 27, 2019
  • Compare two arrays in java with out inbuilt functionsHow to Compare Two Arrays in Java without built-in functions
    November 16, 2019
© Selenium Webdriver Appium Complete Tutorial 2025