Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите сделать эту работу!
Вы можете также прочитать эту статью на English (US).
This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
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 the--headless
flag is used. - Firefox
- The
marionette.enabled
preference or--marionette
flag is passed.
Syntax
var isAutomated = navigator.webdriver
Value
A Boolean
Specifications
Specification | Status | Comment |
---|---|---|
WebDriver The definition of 'webdriver' in that specification. |
Living Standard | Initial definition. |
Browser compatibility
Desktop | Mobile | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Basic support | Chrome Full support 63 | Edge ? | Firefox ? | IE ? | Opera Full support 50 | Safari ? | WebView Android ? | Chrome Android Full support 63 | Edge Mobile ? | Firefox Android ? | Opera Android Full support 50 | Safari iOS ? | Samsung Internet Android ? |
Legend
- Full support
- Full support
- Compatibility unknown
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.