Prior to this change, Chromium only exposed `navigator.webdriver` when the browser was being automated. However, other browsers expose it unconditionally per the spec (https://w3c.github.io/webdriver/#interface), with the value `false` in case the browser is not being automated. We propose changing Chromium to align with other browsers and the spec. This is a potentially breaking change since web pages could in theory rely on the old `navigator.webdriver === undefined` behavior.

Motivation

There is a conflict between implementation and specification of the `navigator.webdriver` API. According to spec https://w3c.github.io/webdriver/#interface and other browser implementations, it should be `navigator.webdriver === false`, while current implementation is `navigator.webdriver === undefined`.

Documentation

Specification

Specification link


Specification being incubated in a Community Group

Status in Chromium

Blink


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Shipped/Shipping
  • Shipped/Shipping
  • Shipped/Shipping
  • No signals

Owner

Comments

W3C specifies `navigator.webdriver` to be `false` in case of automation is not enabled.

Search tags

navigator, webdriver, automation,

Last updated on 2021-04-13