Navigator: webdriver property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since May 2018.

The webdriver read-only property of the navigator interface indicates whether the user agent is controlled by automation.

It defines a standard way for co-operating user agents to inform the document that it is controlled by WebDriver, for example, so that alternate code paths can be triggered during automation.

The navigator.webdriver property is true when in:

Chrome

The --enable-automation or --headless flag is used, or the --remote-debugging-port flag specifying port 0 is used.

Firefox

The marionette.enabled preference or --marionette flag is passed.

Value

A Boolean

Specifications

Specification
WebDriver
# dfn-webdriver

Browser compatibility

desktop mobile server
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Node.js
webdriver
Chrome – Full support
Chrome 63 (Release date: 2017-12-06)
footnote Full support
Edge – Full support
Edge 12 (Release date: 2015-07-29)
footnote Full support
Firefox – Full support
Firefox 60 (Release date: 2018-05-09)
footnote Full support
Opera – Full support
Opera 50 (Release date: 2018-01-04)
footnote Full support
Safari – Full support
Safari 10.1 (Release date: 2017-03-27)
footnote Full support
Chrome Android – Full support
Chrome Android 63 (Release date: 2017-12-05)
footnote Full support
Firefox for Android – Full support
Firefox for Android 60 (Release date: 2018-05-09)
footnote Full support
Opera Android – Full support
Opera Android 46 (Release date: 2018-05-14)
footnote Full support
Safari on iOS – Full support
Safari on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Samsung Internet – Full support
Samsung Internet 8 (Release date: 2018-07-18)
footnote Full support
WebView Android – Full support
WebView Android 63 (Release date: 2017-12-05)
footnote Full support
WebView on iOS – Full support
WebView on iOS 10.3 (Release date: 2017-03-27)
footnote Full support
Node.js – No support
Node.js
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support