Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

A WebDriver works by turning every line of your automation code into an instruction that a real browser can carry out. When you call a method such as get, findElement, or click, the WebDriver client serializes that command into an HTTP request and sends it to a browser driver. The driver translates the request into the browser's native automation, performs the action, and sends back an HTTP response with the result. WebDriver itself is a WebDriver that defines this interface, and Selenium WebDriver is the most widely used implementation of it.
WebDriver is a W3C Recommendation, which means it is an official web standard rather than a single vendor's tool. It specifies a language-neutral interface and wire protocol for remotely inspecting and controlling a browser, the same way a person would by clicking, typing, and navigating. Because it is a standard, the same set of commands behaves consistently whether you automate Chrome, Firefox, Edge, or Safari.
Selenium WebDriver is the implementation most testers mean when they say WebDriver. It ships as a set of open-source client libraries in Java, Python, C#, JavaScript, and Ruby, paired with the browser drivers that actually execute the commands. The key idea is that WebDriver drives the browser natively using its own automation hooks, so your test interacts with the real UI instead of relying on injected JavaScript workarounds.
Here is what happens behind the scenes when you write WebDriver code and run it:
This request-and-response cycle repeats for every command in your test. If a step fails, the response carries an error or exception, which your automation framework surfaces as a failed assertion or a thrown exception.
WebDriver has a clean three-layer architecture. Understanding the layers makes it obvious why a test can fail at the driver level even when your code is correct.
The table below maps each browser to the driver that controls it:
| Browser | Browser Driver | Maintained By |
|---|---|---|
| Google Chrome | ChromeDriver | Chromium / Google |
| Mozilla Firefox | GeckoDriver | Mozilla |
| Microsoft Edge | msedgedriver | Microsoft |
| Apple Safari | safaridriver | Apple |
Every WebDriver run is wrapped in a session, and the session is what ties all of your commands to one specific browser instance.
The wire protocol is the contract that defines how the client and the driver talk to each other. This is the part of WebDriver that changed most significantly in recent years, and it explains why modern Selenium is more stable.
The short Java example below shows the full life of a session. Each highlighted line corresponds to one or more HTTP requests sent to ChromeDriver under the hood.
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.By;
public class WebDriverFlow {
public static void main(String[] args) {
// 1. Creating the driver sends a "New Session" command and returns a session ID
WebDriver driver = new ChromeDriver();
// 2. Each call below is sent to ChromeDriver as an HTTP request
driver.get("https://www.lambdatest.com"); // navigate
driver.findElement(By.name("q")).sendKeys("test"); // locate + type
// 3. quit() closes the session and the browser
driver.quit();
}
}Notice that you never write any HTTP code yourself. The client binding hides the protocol, which is exactly what makes WebDriver feel like a normal programming API.
Everything so far assumes the browser runs on the same machine as your test. In practice, teams often need to run on many browser and operating system combinations at once, which is where remote execution comes in.
Because RemoteWebDriver only needs an endpoint, you can point it at a cloud Selenium Automation to run your existing WebDriver tests across 3,000+ real browsers and operating systems without managing any local drivers. The request-and-response flow is exactly the same; the browser simply lives in the cloud rather than on your laptop.
Classic WebDriver is one-directional: you send a command and wait for a response. WebDriver BiDi is a newer bidirectional protocol that runs alongside the classic W3C protocol and adds a real-time channel. Instead of only issuing commands, your test can subscribe to browser events and stream console logs, network requests, and other introspection data as they happen. This makes it far easier to debug, capture errors, and assert on activity that used to be invisible to a pure command-and-response model.
Both. WebDriver is a W3C standard that defines a language-neutral interface and wire protocol for controlling a browser. Selenium WebDriver is the popular implementation of that standard, made up of client bindings plus the browser drivers that actually carry out the commands.
Each method you call, such as get, findElement, or click, is serialized into an HTTP request and sent to the browser driver's REST endpoint. The driver translates the request into the browser's native automation, performs the action, and returns an HTTP response containing a status and any value, such as the text of an element.
A browser driver is a standalone executable that sits between your test and the browser. ChromeDriver, GeckoDriver, msedgedriver, and safaridriver each understand the W3C WebDriver protocol and know how to control their specific browser. Your script talks to the driver, and the driver talks to the browser.
Yes. The legacy JSON Wire Protocol was retired in Selenium 4. Selenium 3.x ran both the JSON Wire and W3C protocols, which required an encode and decode step. Selenium 4 speaks the W3C WebDriver protocol natively, so the client and the browser share the same language and the translation layer is gone.
WebDriver typically launches a browser on the same machine as your test. RemoteWebDriver implements the same WebDriver interface but points at a remote endpoint, such as a Selenium Grid hub or a cloud grid, so the browser runs on another machine while your code stays the same.
WebDriver BiDi is a newer bidirectional protocol that runs alongside the classic W3C WebDriver protocol. Instead of a one-way command and response, it lets your test subscribe to browser events and stream console logs, network activity, and other introspection data back in real time.
KaneAI - Testing Assistant
World’s first AI-Native E2E testing agent.

TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance