Selenium is a tool to automate web based and mobile based applications.
For web based applications selenium is having inbuild drivers to communicate but for mobile based , selenium will need the additional source to communicate and it is called appium.
High Level Selenium Architecture
1. Language Binding:
This is where we write our automation code.
Languages supported by Selenium are java, python, C#...
It convert our code into WebDriver commands. It acts as an interface between user code and Selenium.
2. Browser Drivers:
This is the middle layer that connects code to browser.
Eg:
ChromeDriver, EdgeDriver, SafariDriver ...
*3. Browsers : *
Final executions happen here.
Eg :
Chrome, edge , safari ...
Internal Selenium Architecture :
- Web Driver class:
This is the main entry point in Selenium.
Eg:
driver = webdriver.Chrome()
It initializes the browser session. It sends commands to the Remote Webdriver.
- Remote Webdriver:
It is the core component of Selenium.
It receives commands from Webdriver class. Then it receives the commands into JSON format. Then it sends requests to browser drivers.
- Browser engine :
Handles actual rendering.
It interprets the commands and interacts with DOM.
- Browser Drivers:
They bridge between Selenium and browser and it executes instructions in browser.
Significance of Python Virtual Environment
A python virtual environment allows developers to manage project dependencies independently. It is especially useful when working on multiple projects with different library requirements.
It is very helpful when we are working on multiple projects. ie, for example if we are using Selenium version 4 in one project and Selenium version 3 in another project.


Top comments (0)