Use this file to discover Exa products, pricing, evaluations, comparisons, use cases, agent interfaces, and technical documentation before exploring further.
Python browser automation libraries control a real browser from code to click, type, navigate, and read pages. A driver sends commands to the browser over the WebDriver standard or the Chrome DevTools Protocol. These libraries let test suites, scrapers, and AI agents operate websites that have no API.
Popularity
Playwright has the most monthly downloads in this comparison, at 129.4M.
from browser_use_sdk.v4 import BrowserUse
with BrowserUse() as client:
created = client.runs.create("Open https://example.com and return its title")
result = client.runs.wait_for_completion(created.id)
print(result.result)
def fetch_js_website(url: str, *, headless: bool = True, timeout: int = 30) -> str:
"""
Scrape the visible text of a JavaScript-rendered webpage.
Launches a headless Chrome instance via undetected-chromedriver so that
sites protected by Cloudflare, Akamai, or similar bot-detection don't
block the request. The browser fully renders the page (including JS),
waits for the <body> element, and returns its inner text.
Args:
url: The webpage URL to scrape.
headless: Run Chrome without a visible window (default True).
timeout: Max seconds to wait for the page to load.
Returns:
The visible text content of the page body.
"""
print(f"Scraper: launching browser for {url}")
options = uc.ChromeOptions()
options.page_load_strategy = "eager"
if headless:
options.add_argument("--headless=new")
options.add_argument("--no-sandbox")
options.add_argument("--disable-dev-shm-usage")
options.add_argument("--disable-gpu")
options.add_argument("--disable-extensions")
options.add_argument(
"--user-agent=Mozilla/5.0 (X11; Linux x86_64) "
"AppleWebKit/537.36 (KHTML, like Gecko) "
"Chrome/131.0.0.0 Safari/537.36"
)
driver = uc.Chrome(options=options, use_subprocess=False, version_main=144)
driver.set_page_load_timeout(timeout)
try:
print(f"Scraper: navigating to {url}")
start = time.perf_counter()
try:
driver.get(url)
except Exception:
# Timeout on page load is expected for heavy sites; the body # may still be available thanks to the 'eager' load strategy. pass
elapsed = time.perf_counter() - start
print(f"Scraper: page response received ({elapsed:.1f}s), waiting for DOM...")
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.TAG_NAME, "body"))
)
# SPA sites hydrate after body appears — wait until text is non-empty WebDriverWait(driver, 20).until(
lambda d: len(d.find_element(By.TAG_NAME, "body").text.strip()) > 100
)
content = driver.find_element(By.TAG_NAME, "body").text
finally:
driver.quit()
word_count = len(content.split())
print(f"Scraper: done — {word_count} words scraped from {url}")
return content
from seleniumbase import SB
with SB() as browser:
browser.open("https://example.com")
FAQ
Playwright suits new automation across Chromium, Firefox, and WebKit with automatic waiting. Selenium suits teams with existing WebDriver suites or grid infrastructure. Browser Use suits AI agents that operate a browser from natural-language tasks.
Playwright drives browsers through its own protocol and waits for elements automatically. Selenium drives browsers through the WebDriver standard and supports remote grids of many browser versions.
Browser Use is a browser agent built on Pydantic AI that drives Chrome over the DevTools Protocol. The browser-use-sdk package calls the hosted Browser Use cloud API instead.
Install Selenium, create a driver for a browser such as Chrome, and call its find and click methods on page elements. Selenium Manager downloads a matching browser driver automatically.
Install Playwright and run its install command to download browser builds. Scripts then launch a browser, open a page, and act on locators through the sync or async API.
SeleniumBase is a framework on top of Selenium for web crawling, scraping, and testing. It integrates with pytest and adds its own helper methods.
For coding agents
Found your browser automation library? Help your agent use it.
Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.