DEV Community

Cover image for How to Test a Selenium Browser Fingerprint

How to Test a Selenium Browser Fingerprint

If you're using Selenium for web automation, testing, or scraping, your browser fingerprint is screaming "I'm a bot!" to every website you visit. Let me show you how to test it and what you can do about it.

Here's the reality that many automation engineers overlook: when you fire up a Selenium-controlled browser, you're not just automating clicks and form fills. You're broadcasting a distinct digital signature that websites can easily detect.

I've spent years analyzing browser fingerprints, and the patterns are consistent. Unpatched Selenium browsers stand out like a sore thumb. The good news? Once you understand what makes your fingerprint unique, you can take steps to blend in.

What Is Browser Fingerprinting, Really?

Let me break this down in simple terms. Browser fingerprinting is a technique websites use to identify your browser without cookies or login credentials.

Imagine you walk into a store wearing distinct shoes, carrying a specific phone model, with a unique watch, and speaking with a recognizable accent. Even if you never give your name, the store can track your return visits by piecing together these identifying characteristics.

Browsers work the same way. Websites collect technical signals:

  • Your screen resolution and color depth
  • Installed fonts and their rendering patterns
  • Graphics card (GPU) information
  • Canvas and WebGL rendering output
  • Audio fingerprinting
  • Timezone and language settings
  • Browser extensions and their behavior

When combined, these signals create a fingerprint that's often unique enough to track you across the web—even without cookies.

Why Selenium Fingerprinting Matters

Here's where it gets interesting for automation. When you use Selenium (or similar tools like Puppeteer and Playwright), your browser exhibits characteristics that differ from a real user's browsing session.

The automation detection problem: Studies show that standard Selenium WebDriver implementations can be detected with over 95% accuracy using simple fingerprinting techniques.

Common red flags include:

  • Missing or inconsistent Navigator properties: navigator.webdriver flag is set to true
  • Unusual Chrome DevTools Protocol behavior: Automation tools use specific CDP commands that human users never trigger
  • Canvas fingerprint anomalies: Rendered images often differ from typical user sessions
  • AudioContext fingerprint deviations: Audio processing patterns show distinctive signatures
  • Lack of user interaction patterns: No mouse movements, natural pauses, or scroll behaviors

These patterns help websites distinguish legitimate automation from bot activity, CAPTCHA solving, or unauthorized scraping.

Testing Your Selenium Fingerprint

Ready to see how your Selenium setup looks to the outside world? Here's how to test it properly.

Step 1: Use a Professional Fingerprinting Service

Start with AmiUnique.io to get a comprehensive analysis of your browser fingerprint. It's a free tool that checks you against a database of over 2 million real-world fingerprints.

What I love about AmiUnique is its transparency. It doesn't just give you a score—it shows you exactly which signals make you unique and how rare each one is in the wild. You'll see:

  • Gold signals (hardware): Canvas, WebGL, GPU renderer, display characteristics
  • Silver signals (software): Fonts, user agent, language settings, browser version
  • Bronze signals (network): ASN, TLS cipher, connection timing

Run your Selenium-controlled browser through this test and compare the results with a normal browsing session. The differences will reveal exactly what's giving you away.

Step 2: Check Automation-Specific Indicators

Open your browser's developer console and run these checks:

// Check if WebDriver flag is exposed
console.log('WebDriver:', navigator.webdriver);

// Check for Chrome DevTools Protocol
console.log('CDP available:', !!window.chrome?.runtime?.id);

// Check for automation permissions
console.log('Automation permissions:', navigator.permissions);

// Examine plugins (should be empty in most modern browsers)
console.log('Plugins:', navigator.plugins?.length || 0);

// Check languages
console.log('Languages:', navigator.languages);
Enter fullscreen mode Exit fullscreen mode

A typical Selenium session will show navigator.webdriver: true, while a normal user's browser returns undefined.

Step 3: Test Canvas and Audio Fingerprints

Run this canvas test to see how your rendering looks:


function getCanvasFingerprint() {
    const canvas = document.createElement('canvas');
    const ctx = canvas.getContext('2d');
    canvas.width = 200;
    canvas.height = 50;

    ctx.textBaseline = 'top';
    ctx.font = '14px Arial';
    ctx.fillStyle = '#f60';
    ctx.fillRect(125, 1, 62, 20);

    ctx.fillStyle = '#069';
    ctx.fillText('Selenium Fingerprint Test 🔒', 2, 15);

    ctx.fillStyle = 'rgba(102, 204, 0, 0.7)';
    ctx.fillText('Automation Detection', 4, 35);

    return canvas.toDataURL();
}

console.log('Canvas fingerprint:', getCanvasFingerprint());
Enter fullscreen mode Exit fullscreen mode

Compare this output between your Selenium session and regular browsing. Differences in the base64 string indicate canvas fingerprint variations.

Improving Your Selenium Fingerprint

Once you know what's exposing your automation, you can take steps to normalize it. Here are practical strategies that actually work.

1. Remove the WebDriver Flag

Modern Selenium (4.x+) allows you to disable the navigator.webdriver flag:

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

options = Options()
options.add_argument('--disable-blink-features=AutomationControlled')
options.add_experimental_option('excludeSwitches', ['enable-automation'])

driver = webdriver.Chrome(options=options)
Enter fullscreen mode Exit fullscreen mode

2. Use Undetected-Chromedriver (Python)

For more robust anti-detection, consider using specialized libraries:

import undetected_chromedriver as uc

driver = uc.Chrome()
#
This automatically patches Chrome to avoid detection
Enter fullscreen mode Exit fullscreen mode

3. Randomize Your User Agent

Rotate through realistic user agents to avoid patterns:

options.add_argument('user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36')

Enter fullscreen mode Exit fullscreen mode

4. Implement Natural User Behavior

Add realistic interactions between actions:

import random
import time

def human_like_delay(min_ms=100, max_ms=500):
    time.sleep(random.uniform(min_ms, max_ms) / 1000)

# Add delays between actions
element.click()
human_like_delay()
element.send_keys("text")
human_like_delay(200, 800)
Enter fullscreen mode Exit fullscreen mode

Advanced Detection: What the Pros Check

Sophisticated websites go beyond basic fingerprinting. Here's what they're looking for:

  • Headless detection: Checking for missing browser UI elements and window characteristics
  • Timing analysis: Measuring how quickly events occur after page load
  • Mouse/keyboard patterns: Analyzing the entropy and naturalness of input
  • CDP command sequences: Detecting automation-specific DevTools protocol usage
  • Lie detection: Cross-referencing timezone, language, and network metadata for inconsistencies

The Bottom Line

Browser fingerprinting isn't going away. As privacy regulations make cookies less reliable for tracking, websites increasingly rely on fingerprinting for security and analytics.

For legitimate automation—testing, monitoring, research—understanding your fingerprint is essential. The goal isn't to be completely invisible (that's impossible), but to avoid triggering false positives and unnecessary blocking.

Here's my recommendation:

  1. Baseline your fingerprint: Run your setup through AmiUnique.io to see your current state
  2. Compare with normal browsing: Test the same site with and without Selenium
  3. Apply targeted fixes: Address the specific signals that make you stand out
  4. Re-test regularly: Fingerprinting techniques evolve, so audit your setup periodically

Top comments (0)