Python Selenium Architecture

Published: (May 3, 2026 at 04:24 AM EDT)
2 min read
Source: Dev.to

Source: Dev.to

High Level Selenium Architecture

Selenium is a tool to automate web‑based and mobile‑based applications.
For web‑based applications Selenium includes built‑in drivers to communicate with browsers. For mobile applications, Selenium requires an additional source called Appium.

Components

  1. Language Binding
    This is where automation code is written. Selenium supports languages such as Java, Python, C#, etc. The binding converts code into WebDriver commands and acts as an interface between user code and Selenium.

  2. Browser Drivers
    The middle layer that connects the code to the browser. Examples: ChromeDriver, EdgeDriver, SafariDriver, …

  3. Browsers
    The final execution happens here. Examples: Chrome, Edge, Safari, …

High Level Selenium Architecture

Internal Selenium Architecture

Internal Selenium Architecture

WebDriver Class

The main entry point in Selenium.

from selenium import webdriver

driver = webdriver.Chrome()

It initializes the browser session and sends commands to the Remote WebDriver.

Remote WebDriver

The core component of Selenium. It receives commands from the WebDriver class, converts them to JSON, and forwards the requests to the appropriate browser driver.

Browser Engine

Handles actual rendering, interprets commands, and interacts with the DOM.

Browser Drivers

Bridge Selenium and the browser, executing the instructions within the browser.

Significance of Python Virtual Environment

A Python virtual environment allows developers to manage project dependencies independently. This is especially useful when working on multiple projects with different library requirements—for example, using Selenium 4 in one project and Selenium 3 in another.

0 views
Back to Blog

Related posts

Read more »

Selenium for automation testing

What is Selenium Selenium is a free automated testing framework used to validate web applications across different browsers and platforms. You can use multiple...

Getting Started with Python

Today I started learning Python, and I explored some fundamental concepts that helped me understand how Python actually works behind the scenes. What is Python?...