What Is Selenium?

Updated June 2026
Selenium is an open-source browser automation framework that lets you control web browsers programmatically using code written in Python, Java, C#, Ruby, or JavaScript. It is the most widely used tool for automated web testing, browser-based data extraction, and workflow automation, with support for Chrome, Firefox, Edge, and Safari through the standardized W3C WebDriver protocol.

The Full Answer

Selenium is a suite of tools and libraries that enable programmatic control of web browsers. When you write a Selenium script, you are giving instructions that a real browser executes: navigate to a URL, find a button, click it, type text into a form, read the results, take a screenshot. The browser performs these actions exactly as it would for a human user, executing JavaScript, loading images, processing CSS, and triggering all the same event handlers and network requests.

The framework was created in 2004 by Jason Huggins at ThoughtWorks as a way to automate testing of an internal web application. The name is a chemistry joke, as selenium is a chemical element that is a natural antidote to mercury poisoning, and the leading commercial testing tool at the time was called Mercury Interactive. Since its creation, Selenium has evolved through multiple major versions, attracted contributions from browser vendors including Google, Mozilla, Microsoft, and Apple, and became the foundation upon which all modern browser automation tools were built.

Selenium is not a single tool but a collection of three components. Selenium WebDriver is the core library that controls browsers through their native automation interfaces. Selenium Grid distributes test execution across multiple machines and browsers simultaneously. Selenium IDE is a Chrome and Firefox extension that records browser interactions and converts them into replayable scripts without requiring code. Most people use "Selenium" to mean WebDriver, which is the component you interact with when writing automation scripts.

The project is entirely open source under the Apache 2.0 license, governed by the Software Freedom Conservancy nonprofit. There are no paid tiers, premium features, or usage limits. The WebDriver protocol that Selenium uses became an official W3C Recommendation (web standard) in June 2018, making it the only browser automation protocol backed by a formal standards body. This standardization means browser vendors are responsible for implementing the protocol in their drivers, ensuring consistent behavior across browsers.

What can Selenium be used for?
Selenium's primary use case is automated testing of web applications. QA teams write scripts that simulate user workflows, such as logging in, navigating menus, submitting forms, and verifying displayed data, to catch bugs before they reach production. Beyond testing, Selenium is widely used for web scraping (extracting data from websites that require JavaScript rendering or user interaction), workflow automation (filling forms, downloading reports, processing multi-step web tasks), and monitoring (checking website availability, content accuracy, and performance). Because Selenium controls a real browser with full JavaScript execution, it can automate anything a human user can do in a web browser, including interacting with single-page applications, handling authentication flows, and processing dynamically loaded content.
Which programming languages does Selenium support?
Selenium provides official client libraries for five programming languages: Java, Python, C#, Ruby, and JavaScript (with TypeScript support). Java is the most widely used in enterprise environments, with the deepest ecosystem of supporting tools. Python is the most popular for web scraping and is preferred by startups, data engineers, and automation beginners for its clean syntax. C# is the standard choice for organizations running on the .NET stack. Ruby and JavaScript have smaller but active communities. All five bindings provide the same WebDriver API, so the same automation logic applies regardless of which language you choose, and switching languages requires adapting syntax rather than learning new concepts.
Which browsers does Selenium support?
Selenium supports Chrome, Firefox, Microsoft Edge, and Safari through browser-specific driver executables maintained by each vendor. ChromeDriver is maintained by the Chromium project at Google. GeckoDriver is maintained by Mozilla for Firefox. EdgeDriver is maintained by Microsoft (based on ChromeDriver since Edge uses the Chromium engine). SafariDriver ships built into macOS and is maintained by Apple. Selenium Manager, included since Selenium 4.6, automatically detects your installed browser version, downloads the matching driver binary, and configures it, eliminating the manual driver management that was historically one of Selenium's biggest setup headaches. Internet Explorer was previously supported but is deprecated since Microsoft retired the browser.
Is Selenium still relevant in 2026?
Selenium remains the most widely deployed browser automation framework in the world, with millions of active test suites running across every industry. While newer tools like Playwright and Cypress have gained significant traction, especially for greenfield projects, Selenium's installed base, ecosystem breadth, and W3C standardization ensure its continued relevance. Selenium 4, released in 2021, modernized the framework with automatic driver management, relative locators, Chrome DevTools Protocol access, and full W3C compliance. The framework continues to receive regular updates and the active community provides extensive support resources. Organizations with existing Selenium infrastructure will continue using and maintaining it for years to come.
How does Selenium compare to Playwright?
Playwright, built by Microsoft, is a newer alternative that communicates directly with browser engines through persistent WebSocket connections rather than Selenium's HTTP-based WebDriver protocol. Playwright is generally faster (2-5x in benchmarks), has built-in auto-waiting that reduces test flakiness, and ships with superior debugging tools including a Trace Viewer, UI Mode, and code generator. Selenium's advantages are its broader language support (five languages versus four, with Ruby being the gap), W3C standardization, vastly larger ecosystem of third-party tools and cloud services, and two decades of community knowledge and documentation. For new projects without existing infrastructure, Playwright is often the recommended choice. For organizations with established Selenium codebases, upgrading to Selenium 4 is typically more practical than migrating to a new framework.

How Selenium Works Under the Hood

Selenium operates through a three-layer architecture that separates your code from the browser. The top layer is your test script, written using the Selenium client library in your programming language. The middle layer is the browser driver, a standalone executable that acts as a translator between the WebDriver protocol and the browser's internal automation interface. The bottom layer is the browser itself.

When your script calls a method like "click this button," the client library translates the command into an HTTP request using the W3C WebDriver protocol and sends it to the browser driver. The driver translates the HTTP request into native browser commands, the browser executes them, and the result flows back through the same layers. Every WebDriver command follows this round-trip pattern.

This HTTP-based communication is the reason Selenium works across networks (enabling Grid distribution to remote machines), supports multiple programming languages (any language that can make HTTP requests can be a client), and works with all browsers (each vendor just needs to implement the same HTTP API in their driver). It is also the reason Selenium is slower than tools like Playwright that use persistent WebSocket connections, since each command requires a full HTTP round trip rather than a quick message over an open connection.

Selenium's Three Components

Selenium WebDriver is the library you use to write automation scripts. It provides methods for navigating pages, finding elements by ID, CSS selector, XPath, and other strategies, interacting with elements (clicking, typing, reading text), managing browser windows and cookies, taking screenshots, and executing JavaScript. WebDriver is the foundation of everything in Selenium and is what people interact with daily.

Selenium Grid enables parallel and distributed test execution. A Grid deployment consists of a central Hub that receives test session requests and routes them to Nodes, which are machines that host browsers. You can run tests across multiple browsers and operating systems simultaneously by pointing your scripts at the Grid Hub instead of a local driver. Cloud services like BrowserStack and Sauce Labs provide hosted Grid infrastructure with access to hundreds of browser and OS combinations.

Selenium IDE is a browser extension for Chrome and Firefox that records your browser interactions and converts them into test scripts. You click through a workflow manually, and the IDE generates the corresponding automation commands. Recorded scripts can be exported to WebDriver code in multiple languages, providing a starting point for test development. The IDE also includes its own test runner for replaying recorded scripts directly in the browser.

Who Uses Selenium

Selenium is used by organizations of every size, from solo developers automating browser tasks to Fortune 500 companies running thousands of automated tests nightly. Companies like Google, Netflix, Amazon, and Microsoft use Selenium as part of their testing infrastructure. It is the most commonly required skill in QA automation job postings and is covered in virtually every software testing certification program.

The framework is particularly prevalent in enterprise Java environments, where it pairs with JUnit or TestNG and integrates into Maven or Gradle build pipelines. In the Python ecosystem, it pairs with pytest and is popular for both testing and web scraping. Financial services, healthcare, e-commerce, and government agencies all rely on Selenium for testing critical web applications where failures have real consequences.

Getting Started with Selenium

Starting with Selenium requires three things: a programming language runtime (Python or Java are recommended for beginners), the Selenium client library installed through your language's package manager (pip install selenium for Python, Maven dependency for Java), and a web browser (Chrome is the most common choice). Selenium Manager handles the browser driver automatically, so no manual driver downloads are needed.

A minimal Selenium script creates a browser instance, navigates to a URL, interacts with the page, and closes the browser. From this foundation, you can build test suites, scraping pipelines, or automation workflows by adding locator strategies, waits, and page object patterns. The Selenium documentation at selenium.dev provides comprehensive guides for each supported language, and the community offers thousands of tutorials, courses, and Stack Overflow answers for every level of experience.

Key Takeaway

Selenium is the foundational browser automation framework that established the category, supports every major language and browser, and remains the most widely used tool for automated web testing. Its open-source nature, W3C standardization, and massive ecosystem make it a safe, well-supported choice for any browser automation project.