Resize page
resize_pageResize the browser window to exact dimensions for responsive-layout testing and accurate screenshots.
Instructions
Resize the browser window so the page gets the given dimensions.
Moves the actual OS window, which is what you want for responsive-layout checks that should also come out right in a screenshot.
To emulate a viewport size without touching the window — including device
pixel ratio, the mobile flag and touch — use emulate's viewport parameter
or emulate_device. Those are what a site's media queries and fingerprinting
read as a genuine device change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | Target page width in CSS pixels. | |
| height | Yes | Target page height in CSS pixels. | |
| 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 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |