The behind scenes workings of Selenium is illustrated below −
Selenium webdriver architecture comprises of −
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.