Emulate page conditions
emulateOverride network, CPU, geolocation, user agent, color scheme, or viewport on a page to test under varied conditions. Each setting is independent and persists across navigations until reset.
Instructions
Emulate network, CPU, geolocation, user agent, color scheme or viewport.
Applies to the selected page and persists across navigations until
reset_emulation. Every parameter is independent — pass only what you want to
change, leave the rest at their defaults. Settings already in force are
carried over rather than dropped: a user_agent on its own keeps the client
hints a device preset established, and a viewport on its own keeps its touch
and mobile flags unless you clear them with notouch / nomobile.
To emulate a real phone or tablet, use emulate_device instead: it sets user agent, client hints, viewport, DPR and touch as one coherent set, which hand-assembled overrides here get wrong in ways anti-bot systems detect.
Turning touch on in the viewport also changes how click behaves — CDP
mouse input can crash a touch-emulated renderer, so clicks fall back to the
scripted path (isTrusted=false) for as long as touch is enabled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| viewport | No | Viewport override as "WIDTHxHEIGHTxDPR[,mobile][,touch][,landscape]", e.g. "375x812x3,mobile,touch" or "1920x1080x1". The trailing flags are optional: `mobile` turns on mobile viewport behaviour, `touch` enables touch emulation, `landscape` sets the screen orientation. Omitting `mobile` or `touch` leaves that setting as it is, so resizing after emulate_device keeps the phone's touch support; turn them off explicitly with `nomobile` / `notouch`. Empty string leaves the viewport unchanged. | |
| user_agent | No | Override the User-Agent header and navigator.userAgent. Omit to leave unchanged; pass an empty string to restore Chrome's real one. This does NOT touch UA client hints (Sec-CH-UA-*), which then contradict the spoofed UA and give the automation away — use emulate_device for mobile, it sets both consistently. | |
| geolocation | No | Override geolocation, as "latitude,longitude" (e.g. "37.7749,-122.4194"). Omit to leave unchanged; pass an empty string to clear a previous override. | |
| color_scheme | No | Emulate the prefers-color-scheme media feature. "auto" clears a previous override; empty string leaves it unchanged. | |
| network_conditions | No | Throttle the network to a preset profile. "Offline" cuts the connection entirely. Empty string leaves throttling unchanged. | |
| cpu_throttling_rate | No | Slow the CPU by this factor to emulate a low-end device (4 = 4x slower; 1-20 is the useful range). 0 or 1 means no throttling. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |