invisible_selenium README

The project's README from github.com/feder-cr/invisible_selenium. As one markdown file: README.md.

invisible_selenium, Selenium's API on an anti-detect Firefox. An animation: the import that changes, the fingerprint set inside the engine, a mouse that moves like a hand, and the options for a reproducible run.

Selenium gets caught by anti-bots and captchas.
This one runs on an anti-detect Firefox with an undetected fingerprint, compatible with your existing Selenium code.

How it works

Anti-bots ask two questions, and reCAPTCHA, hCaptcha and Cloudflare Turnstile score the answers. invisible_selenium answers yes to both.

1. Is this a real browser? Yes. It is Firefox, patched at the C++ source level.

2. Is a real person using it? Yes. The actions are humanized in the driver.


Install

pip install invisible-selenium
python -m invisible_selenium fetch      # one-time download of the patched Firefox, sha256-verified

Requires Python 3.11 or newer. Supported platforms: Windows x86_64 / ARM64 (the x86_64 engine, under Windows' own emulation), Linux x86_64 / arm64.


Usage

Selenium's API, with no code changes. The same webdriver, By, WebDriverWait and expected_conditions. If you already use Selenium, switching is the import:

- from selenium import webdriver
- from selenium.webdriver.common.by import By
+ from invisible_selenium import webdriver
+ from invisible_selenium.webdriver.common.by import By
from invisible_selenium import webdriver
from invisible_selenium.webdriver.common.by import By
from invisible_selenium.webdriver.support.ui import WebDriverWait
from invisible_selenium.webdriver.support import expected_conditions as EC

driver = webdriver.Firefox()
driver.get("https://example.com")
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.TAG_NAME, "a"))).click()  # the mouse arcs to the link
print("seed =", driver.seed)   # log it to replay the run
driver.quit()

Every session gets a distinct fingerprint (GPU, audio, fonts, screen, ~200 fields). Do not install Selenium alongside it: this package already implements its API.

Options

driver = webdriver.Firefox(
    seed=42,                        # same seed, same fingerprint, every run
    proxy={"server": "socks5://host:1080", "username": "u", "password": "p"},
    timezone="America/New_York",    # default: derived from the proxy's exit IP
    pin={"screen.width": 2560, "screen.height": 1440},   # force fields, the rest stays seed-derived
    headless=True,                  # hidden desktop, real rendering: same fingerprint as headed
    profile_dir="./profile",        # cookies and storage survive the run
)

Proxies can be socks5, socks4, http or https, and DNS goes through them too. FirefoxOptions work as they do in Selenium, -headless included. The fields you can pin are the same as in invisible_playwright: pinning.

CLI

invisible-selenium fetch      # download the engine if missing, check every cached one, print the path
invisible-selenium version    # wrapper, core and engine versions

Switching from another tool?

Development

git clone https://github.com/feder-cr/invisible_selenium && cd invisible_selenium
uv venv && uv pip install -e ".[dev]"
uv run pytest -q                      # unit
uv run pytest -q -m e2e               # against the real browser

License

MIT, see LICENSE. The Juggler client it drives the browser with lives in invisible-core, which carries two files taken from Playwright's driver under Apache-2.0. The patched Firefox binary is MPL-2.0, built from feder-cr/firefox_antidetect_patch.

Disclaimer

This project is for educational purposes only. It is provided as-is, with no warranties. I take no responsibility for how it is used. Use it at your own risk and in compliance with the laws of your jurisdiction.


Built by Federico Elia  LinkedIn

tests License: MIT Python 3.11+

invisible_selenium (feder-cr/invisible_selenium)

Searching Database…

What is this?A drop-in replacement for Selenium that runs on a C++-patched, anti-detect Firefox with an undetectable browser fingerprint and humanized mouse/input actions, so anti-bot systems and captchas (reCAPTCHA, hCaptcha, Cloudflare Turnstile) don't flag it as automation.
Is this a whole new automation tool, or does it work with my existing Selenium code?It's a Python library that mirrors Selenium's exact API (webdriver, By, WebDriverWait, expected_conditions), so your existing Selenium scripts work with just an import change.
How do I switch my existing Selenium scripts over?Swap the Selenium import for invisible_selenium; FirefoxOptions, -headless and the rest of the API stay the same. Don't keep Selenium installed alongside it, since this package already implements its API.
What do I need to run it?Python 3.11 or newer, on Windows (x86-64 or ARM64, via Windows' own emulation of the x86-64 engine) or Linux (x86-64 or arm64).
Is this safe to rely on in production?The author explicitly frames it as educational only, provided as-is with no warranties, and takes no responsibility for how it's used — so treat it as experimental, not a supported production tool.
How does it actually fool bot detection?The browser fingerprint (navigator, GPU/WebGL, canvas, fonts, audio, WebRTC, timezone) is set inside the patched Firefox engine itself rather than injected via JavaScript, and there's no geckodriver/Marionette, so navigator.webdriver never turns on. On top of that, clicks and drags follow humanized mouse paths with real timing.
How is this different from selenium-stealth?selenium-stealth patches the page from JavaScript and hasn't been updated since December 2021, while invisible_selenium patches Firefox itself at the C++ source level.
Does it support proxies?Yes — socks5, socks4, http and https proxies are supported, and DNS resolution is routed through them too.
Are there versions for other automation frameworks?Yes, the same engine powers invisibleplaywright (Playwright API), invisiblepuppeteer (Puppeteer API in Python), and invisibleplaywrightmcp (exposed over MCP for AI agents).
Creator
feder-cr
Size
12.5 MB
Stars
3K
Age
2y
Commits · 90 Days