DEV Community

Deepikandas
Deepikandas

Posted on • Edited on

Selenium WebDriver Achitecture

What is Selenium WebDriver?
Selenium WebDriver is a set of open-source APIs, which provided the capabilities to interact with any of the modern web-browsers and then, in-turn to automate the user actions with that browser. It is an essential component of the Selenium family. As we know, Selenium is not an independent tool; rather, it is a collection of tools that make the Selenium suite, which was created when two projects Selenium RC and WebDriver were merged.

  1. Client Libraries (Language Bindings)

πŸ‘‰ This is just your programming language support

Examples:

Java
Python
C#
JavaScript
Simple meaning:

β€œSelenium lets you write automation code in your favorite language.”

So you can say:

Java code β†’ Selenium library understands it
Python code β†’ Selenium library understands it
πŸ“‘ 2. Communication (JSON /W3C+ HTTP)

πŸ‘‰ This is how Selenium sends messages

Simple meaning:

β€œYour code talks to browser using messages sent over the internet format (HTTP + JSON)”

Think like:

You (Java code)
↓ message
Browser driver

Message looks like:

click button
open URL
type text
πŸš— 3. Browser Drivers

Examples:

ChromeDriver
GeckoDriver
Simple meaning:

β€œEach browser has its own helper program that understands Selenium commands”

So:

Chrome β†’ ChromeDriver
Firefox β†’ GeckoDriver

πŸ‘‰ This driver acts like a translator

🌍 4. Browsers

Examples:

Chrome
Firefox
Edge
Simple meaning:

β€œThis is where your website actually opens and runs”

Browser must be installed because:

Selenium does NOT create browsers
It only controls existing browsers
πŸ” Full flow (very simple)
Your Code (Java/Python)
↓
Selenium Library
↓
HTTP + JSON messages
↓
Browser Driver (ChromeDriver / GeckoDriver)
↓
Browser (Chrome / Firefox)

Selenium 4 - Selenium Manager:
πŸ‘‰ Selenium Manager is an internal feature of Selenium 4 WebDriver that automatically handles browser drivers.
Built inside Selenium 4 WebDriver library itself
βš™οΈ** What it does**
βœ” Detects installed browser version
βœ” Downloads correct driver (ChromeDriver/GeckoDriver, etc.)
βœ” Sets driver path automatically
βœ” Removes need for System.setProperty()
❌ In Selenium 3
No Selenium Manager
You had to manually set:
System.setProperty("webdriver.chrome.driver", "path");

Top comments (0)