```yaml
product: AlterLab
title: "Selenium — Web Scraping Glossary | AlterLab"
comparison_context: "AlterLab is an alternative to Firecrawl, ScrapingBee, and Bright Data."
source_url: https://alterlab.io/glossary/selenium
```

tool

# Selenium

Selenium is a browser automation framework originally designed for testing that is widely used for web scraping when JavaScript rendering and browser interaction are required.

Selenium WebDriver controls a real browser (Chrome, Firefox, Safari, Edge) through the W3C WebDriver protocol. It can click elements, fill forms, scroll, navigate, and read the rendered DOM, making it capable of scraping any site that a human can browse. Selenium was the dominant browser automation tool for scraping before Playwright and Puppeteer emerged.

Compared to Playwright, Selenium is slower (due to the WebDriver protocol's HTTP round-trip overhead), has less ergonomic async support, and lacks built-in network interception capabilities. However, its broad browser support and large existing user base mean it remains widely deployed.

Selenium Grid allows distributing browser sessions across multiple machines, enabling horizontal scaling of browser-based scraping. For anti-bot evasion, `undetected-chromedriver` is a popular Selenium wrapper that patches Chrome's WebDriver signatures to reduce detection likelihood.

### What is Selenium?

Selenium is a browser automation framework originally designed for testing that is widely used for web scraping when JavaScript rendering and browser interaction are required.

### How does AlterLab handle Selenium?

Selenium Grid allows distributing browser sessions across multiple machines, enabling horizontal scaling of browser-based scraping. For anti-bot evasion, `undetected-chromedriver` is a popular Selenium wrapper that patches Chrome's WebDriver signatures to reduce detection likelihood.

## Examples

```
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Chrome()
driver.get("https://example.com")
el = WebDriverWait(driver, 10).until(
    EC.presence_of_element_located((By.CSS_SELECTOR, ".product-price"))
)
print(el.text)
driver.quit()
```

## Related Terms

[PlaywrightAn open-source browser automation library from Microsoft that controls Chromium, Firefox, and WebKit through a unified async API.](https://alterlab.io/glossary/playwright)[PuppeteerA Node.js library providing a high-level API to control Chrome or Chromium over the DevTools Protocol, commonly used for scraping JavaScript-heavy sites.](https://alterlab.io/glossary/puppeteer)[Headless BrowserA web browser that runs without a graphical user interface, executing JavaScript and rendering pages exactly as a real browser would.](https://alterlab.io/glossary/headless-browser)[JavaScript RenderingThe process of executing a page's JavaScript in a browser engine before extracting content, required for React, Vue, and Angular SPAs.](https://alterlab.io/glossary/javascript-rendering)[Browser FingerprintingA technique anti-bot systems use to identify bots by collecting dozens of browser attributes including Canvas, WebGL, and timing signatures.](https://alterlab.io/glossary/browser-fingerprinting)

## Extract Selenium data from any website

AlterLab returns clean, structured data from any public URL — no scraper infrastructure needed. Start free, no credit card required.

[View API docs](https://alterlab.io/docs/api/rest)

[Back to Glossary](https://alterlab.io/glossary)