Human Behavior Simulation: Bypass Behavioral Detection with humanize=True

Bézier mouse curves, per-character typing, realistic scrolling — how humanize=True makes your scraper pass BrowserScan and behavioral analysis.

16Yun Engineering TeamApr 15, 20263 min read

Behavioral Detection: The Second Wall After Fingerprinting

Browser fingerprinting tells detection services "what device you are," but it doesn't tell them "whether you're human." Behavioral detection fills that gap by analyzing mouse movement, keyboard input, and scroll patterns.

BehaviorBotHuman
Mouse movementInstant teleportBézier curves with acceleration and overshoot
Click positionPerfect center of buttonScattered within button area
TypingAll chars at same intervalPer-character with variable speed, occasional typos
ScrollingInstant jumpAcceleration → cruise → deceleration micro-steps
Idle pausesNoneThinking pauses, occasional idle micro-movements

Services like BrowserScan, DataDome, and deviceandbrowserinfo.com specialize in analyzing these behaviors. Perfect fingerprints mean nothing if your mouse teleports to every button.

humanize=True: One Flag to Fix It

CloakBrowser's humanize=True intercepts all Playwright interaction calls and replaces them with human-like equivalents:

from cloakbrowser import launch

browser = launch(humanize=True)
page = browser.new_page()
page.goto("https://example.com")

# All operations are now humanized
page.locator("#email").fill("user@example.com")  # per-character typing
page.locator("button[type=submit]").click()       # Bézier curve path
import { launch } from 'cloakbrowser';
const browser = await launch({ humanize: true });

Behavioral Changes

InteractionStock Playwrighthumanize=True
Mouse moveInstant teleportBézier curve with easing and overshoot
ClickInstantRandom offset within target + hold duration
fill()Instant value setCharacter-by-character with pauses
ScrollJump stepMicro-steps: accelerate → cruise → decelerate
KeyboardInstant fillPer-character timing with occasional typos

Verified Results

deviceandbrowserinfo.com checks 24 behavioral signals. CloakBrowser + humanize=True passes all 24:

from cloakbrowser import launch

browser = launch(headless=False, humanize=True)
page = browser.new_page()

page.goto("https://example.com")
page.wait_for_timeout(5000)
# Result: 24/24 signals pass — "You are human!"

browser.close()
Detection ServiceStock PlaywrightCloakBrowser + humanize
deviceandbrowserinfo.com❌ Bot detected✅ You are human!
bot.incolumitas.com13 fails1 fail (WEBDRIVER spec only)
BrowserScanAutomation detectedNormal
reCAPTCHA v3 interaction score0.1 (bot)0.9 (human)

Presets and Custom Configuration

Presets

# Default — normal speed
browser = launch(humanize=True)

# Careful — slower, more deliberate
browser = launch(humanize=True, human_preset="careful")

Custom Parameters

browser = launch(humanize=True, human_config={
    "mistype_chance": 0.05,              # 5% typo rate (auto-corrected)
    "typing_delay": 100,                 # ms per character
    "idle_between_actions": True,        # micro-movements between actions
    "idle_between_duration": [0.3, 0.8], # idle range (seconds)
})
const browser = await launch({
    humanize: true,
    humanConfig: {
        mistype_chance: 0.05,
        typing_delay: 100,
        idle_between_actions: true,
        idle_between_duration: [0.3, 0.8],
    }
});

Parameter Reference

ParameterDefaultEffect
mistype_chance0.02Typo probability (0-1), auto-backspace and retype
typing_delay50-200msPer-character interval (fixed value or range)
idle_between_actionsfalseMicro-movements between actions
idle_between_duration[0.5, 1.5]Idle duration range (seconds)

Important Limitations

Not all Playwright methods go through the humanize pipeline.

✅ Humanized Methods

  • page.click(selector), page.type(selector, text), page.hover(selector)
  • page.fill(selector, text), page.select_option()
  • page.mouse.*, page.keyboard.*
  • page.locator(selector).click(), .fill(), .type(), .hover()
  • page.evaluate() is unaffected (keeps raw behavior)

❌ Methods That Bypass Humanize

page.query_selector() returns ElementHandle objects that bypass all humanize patches:

# ❌ Avoid — ElementHandle skips humanize
element = page.query_selector("#email")
element.click()  # instant teleport, no Bézier curve
element.type("text")  # instant, no per-character timing
# ✅ Recommended — Locator API goes through humanize
page.locator("#email").click()  # Bézier curve
page.locator("#email").fill("text")  # per-character

Always prefer locator over query_selector. The former goes through the full humanize pipeline; the latter bypasses all patches.

When You Need Raw Speed

If a specific action doesn't need humanization (e.g., bulk data export):

page._original.click("#export-button")  # skip humanize

Synergy with Proxies

Behavioral detection also analyzes network patterns — are request intervals uniform (bot) or random (human)?

The full stack: CloakBrowser + humanize + 16Yun residential proxy:

from cloakbrowser import launch

browser = launch(
    proxy="http://user:pass@proxy.16yun.cn:8888",
    geoip=True,
    headless=False,
    humanize=True,
    human_preset="careful",
)

page = browser.new_page()
page.goto("https://example.com")
page.locator("#search").fill("data scraping")
page.locator(".search-btn").click()
page.wait_for_timeout(2000)
# A human pauses 1-3 seconds to "read" results
page.locator(".result-item").first().click()

Add randomized delays between requests rather than fixed intervals to further mimic human browsing behavior.

Need an enterprise proxy plan?

We can tailor architecture to your target domains, concurrency, and reliability goals.