There are four components of Selenium Architecture:
Selenium Client Library
JSON Wire Protocol over HTTP
Browser Drivers
Browsers
Selenium Client Library:
Selenium supports multiple libraries such as Java, Ruby, Python, etc., Selenium Developers have developed language bindings to allow Selenium to support multiple languages.
Below is the link to download Selenium Client Language Bindings:
https://www.seleniumhq.org/download/#client-drivers
JSON Wire Protocol over HTTP:
JSON stands for JavaScript Object Notation. It is used to transfer data between a server and a client on the web. JSON Wire Protocol is a REST API that transfers the information between HTTP server. Each BrowserDriver (such as FirefoxDriver, ChromeDriver etc.,) has its own HTTP server.
Browser Drivers:
Each browser contains separate browser driver. Browser drivers communicate with respective browser without revealing the internal logic of browser’s functionality. When a browser driver is received any command then that command will be executed on the respective browser and the response will go back in the form of HTTP response.
Real Browsers:
Selenium supports multipe browsers such as Firefox, Chrome, IE, Safari etc.
How Selenium Works Internally:
Lets say you have written below couple of lines of code:
WebDriver driver = new ChromeDriver();
driver.get(https://www.automationtestininsider.com)
Based on the above statements, Chrome browser will be launched and it will navigates to automationtestinginsider website.
Once you Run the program, every statement in your script will be converted as a URL with the help of JSON Wire Protocol over HTTP. The URL’s will be passed to the Browser Drivers. (In this case, ChromeDriver). Here in our case the client library (java) will convert the statements of the script to JSON format and communicates with the ChromeDriver. URL looks as shown below.
http://localhost:8080/{"url":"https://www.automationtestinginsider.com"}
Every Browser Driver uses a HTTP server to receive HTTP requests. Once the URL reaches the Browser Driver, then the Browser Driver will pass that request to the real browser over HTTP. Then the commands in your selenium script will be executed on the browser.
If the request is POST request then there will be an action on browser
If the request is a GET request then the corresponding response will be generated at the browser end and it will be sent over HTTP to the browser driver and the Browser Driver over JSON Wire Protocol and sends it to the UI (Eclipse IDE).
This is how Selenium Commands works internally.
To get more details please watch below youtube video and Subscribe the channel.
Selenium Client Library
JSON Wire Protocol over HTTP
Browser Drivers
Browsers
Selenium Client Library:
Selenium supports multiple libraries such as Java, Ruby, Python, etc., Selenium Developers have developed language bindings to allow Selenium to support multiple languages.
Below is the link to download Selenium Client Language Bindings:
https://www.seleniumhq.org/download/#client-drivers
JSON Wire Protocol over HTTP:
JSON stands for JavaScript Object Notation. It is used to transfer data between a server and a client on the web. JSON Wire Protocol is a REST API that transfers the information between HTTP server. Each BrowserDriver (such as FirefoxDriver, ChromeDriver etc.,) has its own HTTP server.
Browser Drivers:
Each browser contains separate browser driver. Browser drivers communicate with respective browser without revealing the internal logic of browser’s functionality. When a browser driver is received any command then that command will be executed on the respective browser and the response will go back in the form of HTTP response.
Real Browsers:
Selenium supports multipe browsers such as Firefox, Chrome, IE, Safari etc.
How Selenium Works Internally:
Lets say you have written below couple of lines of code:
WebDriver driver = new ChromeDriver();
driver.get(https://www.automationtestininsider.com)
Based on the above statements, Chrome browser will be launched and it will navigates to automationtestinginsider website.
Once you Run the program, every statement in your script will be converted as a URL with the help of JSON Wire Protocol over HTTP. The URL’s will be passed to the Browser Drivers. (In this case, ChromeDriver). Here in our case the client library (java) will convert the statements of the script to JSON format and communicates with the ChromeDriver. URL looks as shown below.
http://localhost:8080/{"url":"https://www.automationtestinginsider.com"}
Every Browser Driver uses a HTTP server to receive HTTP requests. Once the URL reaches the Browser Driver, then the Browser Driver will pass that request to the real browser over HTTP. Then the commands in your selenium script will be executed on the browser.
If the request is POST request then there will be an action on browser
If the request is a GET request then the corresponding response will be generated at the browser end and it will be sent over HTTP to the browser driver and the Browser Driver over JSON Wire Protocol and sends it to the UI (Eclipse IDE).
This is how Selenium Commands works internally.
To get more details please watch below youtube video and Subscribe the channel.
Understanding how Selenium works internally helps automation testers see how their scripts communicate with browsers through client libraries, browser drivers, and HTTP-based commands. The article explains how Selenium commands are translated into requests, processed by the appropriate browser driver, and executed in the actual browser. This knowledge is useful when troubleshooting automation failures and understanding the underlying architecture of browser testing.
ReplyDeleteAlthough the article describes the older JSON Wire Protocol, the same general client-driver-browser interaction remains important when learning Selenium architecture. Building a strong foundation in programming and web technologies through Javascript Course in Chennai can help learners understand browser communication, HTTP requests, and the technologies involved in modern web applications.
For anyone pursuing test automation, understanding the relationship between client libraries, browser drivers, and browser execution provides a useful starting point for writing maintainable test scripts. Strengthening programming fundamentals through Javascript Training in Chennai can complement this knowledge and help learners develop a broader understanding of web application behaviour and automated testing workflows.
ReplyDelete