Skip to main content

SB Stealth Wrapper 0.5.0: Explicit Failures for Authorized Browser Tests

What changed in Linux headless behavior, challenge recovery, input strategies, and screenshot handling.

2 min read
SB Stealth Wrapper 0.5.0: Explicit Failures for Authorized Browser Tests
On this page

Release checked September 5, 2026
This article now reflects v0.5.0 and the documented behavior of that project. Existing URLs are preserved so older links continue to work.

SB Stealth Wrapper is a small wrapper around SeleniumBase UC Mode. The current release focuses on bounded recovery and visible failures for authorized browser testing. It cannot make automation undetectable, and a successful run against one challenge page is not evidence of universal bypass.

Linux headless behavior changed

In 0.5.0, headless=True runs without a virtual display. Headed execution with headless=False requires Xvfb on Linux. The original article described automatically turning headless runs into headed Xvfb runs; that description is no longer current.

python
from sb_stealth_wrapper import StealthBot

# Replace with a staging application you are authorized to test.
with StealthBot(headless=True) as bot:
    bot.safe_get('https://test.example.com/login')
    bot.smart_click('#login-button')
    bot.sb.wait_for_text('Dashboard', timeout=15)
    bot.save_screenshot('after-login')

Navigation and action failures must stay visible

safe_get() checks configured success text or the absence of detected challenges. Exhausted challenge recovery raises ChallengeNotSolvedError; missing configured text raises SuccessCriteriaNotMetError. A failed smart_click() raises StealthBotError instead of silently continuing.

A navigation success criterion must be visible after navigation. Do not configure text that can appear only after a later click. Verify that post-click state separately, as the example does.

Understand fallback clicks

The wrapper tries its input strategy, a standard click, a JavaScript click, and bounded recovery. A JavaScript click can act differently from a user pointer interaction. For an accessibility or interactability test, a fallback succeeding may hide the behavior you intended to verify; choose the strategy to match the test.

Other 0.5.0 boundaries

  • Screenshot names must be plain filename stems; path separators are rejected.
  • Fingerprint mutation is disabled by default. Experimental strategies are opt-in.
  • Challenge detection uses heuristics and can misclassify a page.
  • Site policy, IP reputation, browser versions, and dependencies can change the outcome.

Replace misleading benchmarks with controlled evidence

The earlier comparison showed Selenium and Playwright failing to launch while StealthBot completed a navigation. Those are different failure conditions, so the timings do not establish superior challenge handling. Use a common fixture and working browser installations, then compare the same assertions.

bash
python -m pip install "sb-stealth-wrapper==0.5.0"

The wrapper is built on SeleniumBase. Use it on systems you own or have explicit permission to test, and keep ordinary assertions as the source of truth.

Current project documentation

Dhiraj Das

About the Author

Dhiraj Das is an Automation Consultant with over a decade of experience building systems that expose failures, reduce flakiness, and make complex workflows repeatable. He applies that discipline to AI-agent validation, LLM testing, and postmortems.

He shares small open source utilities from real automation work, including: waitless (flaky tests), sb-stealth-wrapper (bot detection), selenium-teleport (state persistence), selenium-chatbot-test (AI chatbot testing), lumos-shadowdom (Shadow DOM), and visual-guard (visual regression).

Share this article: