Playwright

Download 0
Last updated Sep 5, 2026

playwright-resize

Resizes the browser window of an open session and returns the screen as it looks at that size.

Sessions already open at 1600x900, which clears the common breakpoints; widen further for a site that needs it.

Every ref from the previous reading is void afterwards, because a resize reflows the page. The new snapshot comes back in this command's own observation field, so there is no need to observe again.

playwright-resize session-id=VALUE width=VALUE height=VALUE
session-id=VALUE
Required. Browser session to resize. e.g. the session_id returned by playwright-open
width=VALUE
Required. Window width in pixels, 320 to 3840. e.g. 1920
height=VALUE
Required. Window height in pixels, 200 to 2160. e.g. 1080

Output Fields

FieldTypeNameDescription
session_idStringSession ide.g. 6f1c2a08-6c1e-4a1b-9a5e-9b2f0d3c7e11
urlStringURLe.g. https://www.example.com/policy/list
titleStringPage titlee.g. Policy - Console
viewport_widthIntegerWidthe.g. 1920
viewport_heightIntegerHeighte.g. 1080
element_countIntegerElement countAddressable elements at this size. A jump from the previous reading is the collapsed part of the page appearing. e.g. 108
settle_msLongSettle timee.g. 1800 - milliseconds waited for the page to finish reflowing
observationStringObservationAccessibility snapshot at the new size, with fresh refs. e.g. - link "Packages" [ref=e151]
errorStringErrorSet when the site refused the reading. e.g. navigation timeout