navigator.webdriver is a read-only boolean that tells you whether the browser is controlled by automation (WebDriver). Co-operating agents set it so pages can take alternate paths during tests (MDN).
Read the notes below before you rely on this property. Prefer feature detection when support is limited.
Syntax
Use navigator.webdriver. Start with this line.
JavaScript
navigator.webdriver
Call
What it does
navigator.webdriver
Primary signature.
Built into the browser. Read navigator.webdriver on Navigator — no import required.
Map to a label. Ternary chooses automated vs interactive.
Normalize.!!navigator.webdriver keeps a clean boolean in the object.
Optional context. Include a short UA snippet for debug logs.
Use case. Handy in CI dumps and support diagnostics.
Compatibility
Browser Support
navigator.webdriver is Baseline Widely available (MDN: since May 2018). It works across modern browsers and does not require a secure context.
✓ Baseline · Widely available
Navigator.webdriver
Boolean automation signal. True when WebDriver (or equivalent automation flags) controls the browser so pages can take alternate test paths.
ExcellentBaseline
Google ChromeSupported · since 2018 era
Full support
Mozilla FirefoxSupported · since 2018 era
Full support
Apple SafariSupported · modern versions
Full support
Microsoft EdgeSupported · Chromium
Full support
OperaSupported · modern versions
Full support
Internet ExplorerLimited / legacy
Partial
webdriverWidely available
Bottom line: Read navigator.webdriver to branch test-friendly behavior. Prefer it for cooperation with automation — not as sole bot detection.
Frequently Asked Questions
A boolean. It is true when the user agent is controlled by automation (WebDriver), and typically false for a normal interactive browser session.
No. MDN marks it Baseline Widely available (since May 2018). It is not Deprecated, Experimental, or Non-standard.
MDN: when Chrome is started with --enable-automation or --headless, or with --remote-debugging-port set to port 0.
MDN: when the marionette.enabled preference is set or the --marionette flag is passed.
No. It is a standard cooperation signal for automation. Sophisticated bots or patched drivers may hide or omit the flag. Prefer it for test/automation code paths, not as your only security check.
No. It is a read-only Navigator property. You read the boolean; you do not assign a new value from page script.