emulate
Simulate device viewports, user agents, network conditions, geolocation, and more on a target page to test responsive design and performance under varied browser environments.
Instructions
Emulates various features on the target page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | Targets a specific page by ID. | |
| viewport | No | Emulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode. | |
| userAgent | No | User agent to emulate. Set to empty string to clear the user agent override. | |
| colorScheme | No | Emulate the dark or the light mode. Set to "auto" to reset to the default. | |
| geolocation | No | Geolocation (`<latitude>,<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override. | |
| extraHttpHeaders | No | Extra HTTP headers as a JSON string object, e.g. {"X-Custom": "value", "Authorization": "Bearer token"}. Headers are included into every HTTP request originating from the page and persist across navigations until cleared. Pass an empty string to clear all extra headers. | |
| cpuThrottlingRate | No | Represents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling | |
| networkConditions | No | Throttle network. Omit to disable throttling. |