How UC Mode and CDP Mode work
UC Mode combines three techniques. First, it patches the chromedriver binary to randomise the window.cdc_* markers websites scan for. Second, it uses a browser-first launch: Chrome starts as a standalone clean process and chromedriver connects afterwards, instead of Chrome being launched through the driver with bot signatures from the start. Third — the clever part — it disconnects the driver (driver.service.stop()) during page load and clicks, scheduling the navigation/click via JavaScript while disconnected, then reconnects. Detection scripts that probe for chromedriver during those moments find nothing.
CDP Mode goes further, driving the page over the Chrome DevTools Protocol directly so there are no WebDriver artifacts at all — slower than vanilla Selenium but stealthier, and mixable with WebDriver when needed.
Built-in CAPTCHA solving
SeleniumBase is the only tool in this comparison with automatic CAPTCHA handling. uc_gui_click_captcha() and uc_gui_handle_captcha() use PyAutoGUI to move the OS-level mouse with natural curves and click the Turnstile / reCAPTCHA checkbox at a small random offset. Because PyAutoGUI operates outside the browser context entirely, detection scripts cannot distinguish it from real input. The catch: this needs a real display, so on Linux you must run under xvfb rather than true headless.
Strengths, costs, and when to use it
The repo ships 200+ working examples against real protected sites (Cloudflare, Imperva, DataDome, Kasada, PerimeterX, reCAPTCHA). Use it when: you need automatic CAPTCHA solving, want a full pytest/unittest testing framework, or face multi-layer protection in Python. Costs: a steep learning curve, a heavy dependency tree, 2–5× slower than vanilla Selenium because of reconnect overhead, and UC Mode is detectable in true headless (use xvfb). Pair it with residential proxies and incognito=True for best results.
