Javatpoint Logo
Javatpoint Logo

Selenium WebDriver- Architecture

Selenium WebDriver API provides communication facility between languages and browsers.

The following image shows the architectural representation of Selenium WebDriver.


Selenium WebDriver Architecture

There are four basic components of WebDriver Architecture:

  • Selenium Language Bindings
  • JSON Wire Protocol
  • Browser Drivers
  • Real Browsers

Details of each components:

Selenium Language Bindings / Selenium Client Libraries

Selenium developers have built language bindings/Selenium Client Libraries in order to support multiple languages. For instance, if you want to use the browser driver in java, use the java bindings. All the supported language bindings can be downloaded from the official website (https://www.seleniumhq.org/download/#client-drivers) of Selenium.

JSON Wire Protocol

JSON (JavaScript Object Notation) is an open standard for exchanging data on web. It supports data structures like object and array. So, it is easy to write and read data from JSON. To learn more about JSON, visit https://www.javatpoint.com/json-tutorial

JSON Wire Protocol provides a transport mechanism to transfer data between a server and a client. JSON Wire Protocol serves as an industry standard for various REST web services. To learn more about Web Services, visit https://www.javatpoint.com/web-services-tutorial

Browser Drivers

Selenium uses drivers, specific to each browser in order to establish a secure connection with the browser without revealing the internal logic of browser's functionality. The browser driver is also specific to the language used for automation such as Java, C#, etc.

When we execute a test script using WebDriver, the following operations are performed internally.

  • HTTP request is generated and sent to the browser driver for each Selenium command.
  • The driver receives the HTTP request through HTTP server.
  • HTTP Server decides all the steps to perform instructions which are executed on browser.
  • Execution status is sent back to HTTP Server which is subsequently sent back to automation script.

Browsers

Browsers supported by Selenium WebDriver:

  • Internet Explorer
  • Mozilla Firefox
  • Google Chrome
  • Safari




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials