Selenium 4 Architecture

Vaibhav Singh
Posted on 27th Oct 2023 2:09 AM | 10 min Read | 60 min Implementation

#selenium4 #w3cprotocol #techelliptica #w3c


Selenium 4 has entered the market, and many companies are still uncertain about migrating their framework from Selenium 3 to Selenium 4. This confusion is quite common because Selenium 4 introduces numerous features, including the implementation of the W3C Protocol, DevTools Protocol, Relative Locator, the Chromium driver, and improved code stability.


All these implementations are rooted in Selenium 4's new architecture, which makes WebDriver-4 an industry-wide accepted and robust framework. Let's delve into how Selenium 4 Architecture functions:


Step 1: It all begins when we trigger our Selenium script (which can be written in various programming languages like Java, C#, Python, PHP, or JavaScript). When the script is triggered, it initiates the WebDriver server on a specific port.


Step 2: Subsequently, the Selenium client library transfers our code to the WebDriver. To facilitate this interaction, the WebDriver employs the W3C protocol. This streamlined transfer is possible because the WebDriver now interacts with the browser exclusively through the W3C protocol, eliminating the need for complex conversions.


Step 3: As the WebDriver sends code to the browser, the browser responds to the requested commands, executing the required steps and providing feedback to the WebDriver regarding the process acknowledgment.


The primary change in this entire workflow is the incorporation of the W3C Protocol in Selenium 4. With the WebDriver interacting seamlessly with the W3C Protocol, both the client and server essentially communicate in the same language. This results in a reduction of issues related to sockets that were prevalent in previous versions, leading to a more efficient interaction with the browser.


All Comments ()
Do You want to add Comment in this Blog? Please Login ?