Emulate page conditions
emulateSet custom network, CPU, geolocation, user agent, color scheme, or viewport on the current page to test behavior under different conditions. Overrides persist 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.
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 |
|---|---|---|---|
| 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. 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 |