Skip to main content

What is nodriver?

nodriver is the official successor of Undetected-Chromedriver, providing a fully asynchronous Python library for browser automation and web scraping. It communicates directly with the browser using the Chrome DevTools Protocol (CDP), eliminating the need for Selenium or ChromeDriver binaries.
No more WebDriver, no more Selenium - Direct communication provides better resistance against web application firewalls (WAFs) with massive performance gains.

Why nodriver?

What makes nodriver different from other browser automation packages is its optimization to stay undetected by anti-bot solutions, combined with a focus on usability and quick prototyping.

Undetectable by design

Optimized to bypass Captcha, Cloudflare, Imperva, hCaptcha, and other anti-bot systems

Fully asynchronous

Built on async/await for massive performance improvements and granular control

No dependencies

No ChromeDriver binary or Selenium requirement - communicates directly with the browser

Quick to start

Up and running in 1-2 lines of code with best practice defaults built-in

Key features

Smart element lookup

Find elements by text or CSS selector with intelligent matching:
# Find by text - matches by closest text length (shortest wins)
await tab.find("accept all")

# Find all occurrences
await tab.find_all("sometext")

# CSS selectors with iframe support
await tab.select("a[class*=something]")

# Get all matching elements
await tab.select_all("a[href] > div > img")

# XPath support
await tab.xpath("//button[@type='submit']")

Automatic cleanup

  • Uses a fresh profile on each run
  • Automatically cleans up created files on exit
  • Save and load cookies to skip repetitive login steps

Advanced capabilities

Built-in Cloudflare challenge solver with tab.cf_verify() - finds and clicks the checkbox automatically (requires opencv-python).
Add custom handlers for any CDP event:
tab.add_handler(cdp.network.ResponseReceived, callback)
Easy access to browser storage:
await tab.get_local_storage()
await tab.set_local_storage(data)
Connect to an existing Chrome debug session for debugging and inspection.

Supported browsers

nodriver works with all Chromium-based browsers:
  • Chrome
  • Chromium
  • Edge
  • Brave
You need a Chromium-based browser installed, preferably in the default location. For headless environments (AWS, Docker, etc.), use Xvfb to emulate a screen or run in headless mode.

Quick example

Here’s how simple it is to get started:
import nodriver as uc

async def main():
    browser = await uc.start()
    page = await browser.get('https://www.nowsecure.nl')
    
    await page.save_screenshot()
    await page.scroll_down(150)
    
    elems = await page.select_all('*[src]')
    for elem in elems:
        await elem.flash()

if __name__ == '__main__':
    uc.loop().run_until_complete(main())

Next steps

Installation

Install nodriver and get your environment ready

Quickstart

Build your first automation script in minutes

API Reference

Explore the complete API documentation

Examples

Learn from real-world use cases and patterns

Build docs developers (and LLMs) love