Architecture of Selenium 3 vs Selenium 4
ANANDU K V
Test Lead | Automation Test Engineer |Python | Selenium | pytest | ISTQB -CTFL | Microsoft AZ- 204| Google ACE | Robot framework | postman | Copado Robotic Testing | Quality Assurance | C#| Applitools| Az-104| Java | BDD
Selenium 3 Architecture:
Selenium 3 Architecture is made up of four major components:
Selenium Client Library connects with Browser Drivers and Browsers using the JSON (JavaScript Object Notation) Wire Protocol.?
JSON protocol provides a transport mechanism for transferring data between client and server on the web through various data structures like arrays and objects used to read and write data from JSON.
JSON acts as a REST (Representational State Transfer) API to exchange information between HTTP servers.?
JSON wire protocol was used before Selenium version 3.8. After Selenium 3.8, W3C protocol was introduced. But, in version 3 they still provided the support for JSON wire protocol, which was completely removed later in Selenium 4
Selenium 4 Architecture:
W3C protocol was introduced because all the web browsers followed the W3C standards and also all the browser drivers followed the W3C standards. To standardize the communication, JSON wire protocol was replaced by W3C. This helped in better communication with the browsers, stability, and common code (i.e. no browser specific code required).?
Due to W3C there is a direct transfer of information between client and server. Major components of selenium 4 are selenium client and webdriver language bindings.