emulation module
The emulation module contains commands for overriding the behavior of certain Web APIs, such as the Geolocation API and the Screen Orientation API, to simulate different environments.
Specifications
| Specification |
|---|
| WebDriver BiDi # module-emulation |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
emulation
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setGeolocationOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
coordinates parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
error parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setLocaleOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Applies override to newly created cross-origin iframes.
|
|
|
|
|
|
|
|
|
|
|
|
|
locale parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets the
Accept-Language HTTP header.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Sets the
navigator.language and navigator.languages properties.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Applies override to existing sandboxes.
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setNetworkConditions command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
networkConditions parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
"offline"
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setScreenOrientationOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
screenOrientation parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setScreenSettingsOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setScriptingEnabled command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
enabled parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setTimezoneOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
timezone parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
emulation.setUserAgentOverride command
|
|
|
|
|
|
|
|
|
|
|
|
|
contexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userAgent parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
userContexts parameter
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- Experimental. Expect behavior to change in the future.
- Non-standard. Check cross-browser support before using.
- See implementation notes.