Selenium WebDriver 3 vs 4: Core Architecture Differences!

Selenium 3 Architecture:

Selenium 3 Architecture is made up of four major components:

  • Selenium Client library / Language Bindings
  • JSON wire protocol over HTTP
  • Browser Drivers
  • Browsers

    Let’s elaborate on the process, In Selenium 3 Client Library connects with Browser Drivers and Browsers using the JSON Wire Protocol (JSON means JavaScript Object Notation). 

    JSON protocol provides a transport mechanism for transferring data between client and server through HTTP using various data structures like arrays and objects used to read and write data from JSON. At the end, “Server” returns the “Response” and “Client” receives the same. 

    So this is the basic working architecture model of Selenium 3 where 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:

    As I said W3C protocol was introduced in Selenium 4 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 got replaced by W3C. As a result,  there is direct transfer of information between the client and server and this helps in better communication with the browsers, stability, and common code (i.e. no browser specific code required). 

    Means, the command/request can be accessed by both the elements in their own languages. You can understand it with an example. Suppose the command is written in Python and it can also be interpreted in Java, C#, Ruby On Rails, etc.

    Share the Knowledge

    You May Also Like

    About the Author: Sariful I.

    Leave a Reply

    Your email address will not be published. Required fields are marked *