How Selenium Works?
What is Selenium?
Selenium is a free, open-source automated testing framework that checks web applications on various browsers and platforms. You can use different programming languages, such as Java, C#, Python, etc., to make Selenium Test Scripts. The testing carried out with the Selenium tool is commonly known as Selenium Testing.
how Selenium works?
Selenium operates using the client-server design, a software architecture model comprising a client system and a server system. These two components communicate either through a computer network or on the same computer. To delve deeper into the Selenium architecture, let's explore further details.
in the picture above, the initial element is the Selenium Client Library, functioning as a client. You have the flexibility to choose a programming language that suits you to write your automation script, and Selenium takes care of the remaining tasks. Once you write the script in your preferred language, Java, C#, Python, Ruby, or Javascript,then the first step involves sending the script to the Json Wire Protocol through an API.
Json Wire Protocol:
JSON Wire Protocol is a communication protocol used by Selenium WebDriver to interact with web browsers. It facilitated the communication between the client (where your Selenium script is running) and the browser driver (responsible for controlling the web browser).
领英推荐
And now third element in the picture is Browser Driver. Each browser driver has an HTTP server that accepts requests from clients sent by JWP.
Browser Driver is used to interact with the real browser and deliver automation script instructions to the real browser to be turned into an action.
The last point is the Real Browser.
The best feature of Selenium WebDriver is its compatibility with major web browsers such as Google Chrome, Mozilla Firefox, Internet Explorer, and Safari. Each browser has its dedicated WebDriver for running automation scripts.
Such as Chrome:chrome drivers, Firefox:gecko drivers, Safari:safari drivers, Opera:opera drivers, Edge:edge drivers.