Skip to main content
A display of a [Machine]. Obtain via [Machine.screens], [Machine.mainScreen], [Machine.screenFromMouse], or [Window.screen]. A handle pins work to one display: two [Screen.screenshot] calls on the same handle always capture the same display, unlike re-resolving the cursor’s screen between captures.

Constructor

Returns

Screen

Methods

boundingBox()

Live bounding box of the screen on the global desktop. Top-left of the primary monitor is (0, 0), in the canonical coordinate space (OS-native units; see [Machine]). Monitors arranged to the left of or above the primary display contribute negative left / top. right and bottom are exclusive (Playwright / DOM convention), matching [Window.boundingBox]. For just the size, read right - left and bottom - top on the returned box.

Returns

BoundingBox

screenshot()

Capture this screen’s pixels. On Android hideCursor is ignored — a phone has no cursor.

Parameters

boolean
required

Returns

Screenshot