Behind the scenes working of Selenium.

SeleniumAutomation TestingTesting Tools

The behind scenes workings of Selenium is illustrated below −

Source −

Selenium webdriver architecture comprises of −

  • Selenium Binding Languages – It can used on multiple languages (Java, Ruby, Javascript, C#, Python, and so on). So it possesses the language bindings for multiple languages.

  • JSON Wire Protocol – It is known as the Javascript Object Notation. It sends the data from the server to the client page. It is built on the concepts of Rest API which conveys information within HTTP servers.

  • Browser Driver – A browser has a browser driver. It communicates with its browser. When a driver gets a command, it is executed on the browser and the execution status is sent in the form of HTTP response.

  • Browser – Selenium can perform cross-browser testing on multiple browsers like IE, Edge, Chrome, and so on.

As we start running the script for execution, the test script is transformed to an URL with the help of the JSON Wire Protocol on the top of HTTP. The URL will then be acted upon by the browser driver. The browser driver utilizes the HTTP server to receive the HTTP request.

Next, the browser driver sends the request to the browser with the help of HTTP. Then the actual code gets executed. If the request is of type POST, there will be an operation on the browser.

If the request is of type GET, a response is received at the browser. It shall then be transmitted to the browser driver through HTTP. The browser driver sends it to the IDE via the JSON Wire Protocol.

Updated on 28-Dec-2020 11:31:02