Selenium Architecture :
* Selenium WebDriver is a automation tool used for testing web applications across different browsers.
* Selenium 3 Architecture is based on client-server model.
* Selenium 3 (WebDriver architecture) is based on JSON Protocol.
* JSON stands for Java Script Object Notation.
Selenium 3 Architecture:
Selenium 3 Components:
WebDriver architecture includes
* Client Library
* WebDriver API
* Browser Drivers
* Real Browsers
1.Client Library:
* Selenium supports multiple libraries like Python, Java, Ruby, C#.
* These libraries allow Selenium WebDriver to interact with control browser with the help of JSON Protocol.
2.WebDriver API:
* It is an open source programming interface that allow developers to interact with a web browsers.
* JSON Protocol is used for communication between Client Library and Browser Driver in Selenium3 .
* It is a set of commands and responses in JSON format exchanged over HTTP requests
HTTP - Hyper Text Transfer Protocol
3.Browser Drivers:
* It establish communication between Web Driver and actual web browsers like Chrome Driver, Gecko Driver (Firefox), Safari Driver etc..
* The browser Driver decodes JSON commands and interacts with real web browsers.
4.Real Browsers:
* These are browsers like Chrome, Firefox, Safari, Edge where actual testing takes place.
* Browsers performs actions like clicking buttons, navigating page, filling forms etc. on the web page based on received commands.
Selenium 4 Architecture:
* Selenium 4 architecture is mostly similar to that of Selenium3, however it uses W3C Protocol instead of JSON Protocol.
* W3C stand for World Wide Web Consortium which is an international community that develops and maintains standards and guidelines of World Wide Web.
* Selenium 4 is also a client-server model where W3C Protocol is used for communication between Client library and Browser Drivers.
* W3C is used for better consistency, performance and compatibility across different browsers.
Selenium4 Architecture:
Python Virtual Environment:
* Python Virtual Environment is an isolated space where we can work on python projects, separately from system installed Python
To install Virtual environment- pip install vitualenv.
* It provides isolated environment for each project, where one project will not interfere with other project.
Significance of Python Virtual Environment:
* It helps us to work on different projects with different requirements.
For example When we are working on two project one using Flask and other using Tornado there will no interference between Flask and Tornado versions because of Virtual environment.
* It is used for specific version of python that can be different systems default version based on project.
For example when we need to work on project using version python 3.10 but our system version is 3.11 we can create virtual environment with python 3.10.
* Easily replicates project environment on different system by activating virtual environment.
* It allows us to avoid installing python packages globally by making an isolated environment which means it will install packages just in our desire project folder.


Top comments (0)