Screen methods, browser sessions serve 1, phone sessions 2 and computer sessions 1. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.
Screen.screenshot
Browser: served
Phone: served
Computer: served
A PNG of the live view: Chrome’s whole window with space window (the default), or cropped to the page’s content area with space viewport, as Playwright’s page.screenshot. format jpeg returns jpegBase64 instead of pngBase64, at quality (80 by default): a fraction of the size, for agents that look at every step. maxWidth (space viewport only) has Chrome scale the image down to at most that many pixels wide and reports scale, image pixels per CSS pixel: a model reads a 1024-wide page about as well as a 1920-wide one at well under half the image tokens.
| Param | Type | Required | Description |
|---|---|---|---|
space | string | No | The space a call’s coordinates and returned bounds are in. screen is the desktop’s pixels from its top-left: the only space in a computer session, and its default there. In a browser session window (the default) is window pixels. viewport is the page’s CSS pixels from the main frame viewport’s top-left, as Playwright’s page.mouse and boundingBox use; under it a point outside the viewport fails with InvalidArgs. One of window, viewport, screen. Default "window". |
format | string | No | Image format; jpeg returns jpegBase64. One of png, jpeg. Default "png". |
quality | integer | No | JPEG quality (format jpeg only); 80 when omitted. From 1 to 100. |
maxWidth | integer | No | Scale a browser viewport screenshot down to at most this many pixels wide (200 or more; 0 or omitted keeps it full size). Chrome scales it, so text stays legible at about 1024; the result says the scale. |
| Field | Type | Description |
|---|---|---|
pngBase64 | string | Base64-encoded PNG. |
jpegBase64 | string | Base64-encoded JPEG (format jpeg). |
scale | number | Image pixels per CSS pixel when maxWidth scaled the image down: divide a point in the image by scale for the CSS pixels Pointer.* takes in space viewport. Absent at full size. |
Screen.observe
Browser: not served
Phone: served
Computer: not served
Read the screen with OCR and icon detection: every text with its box and confidence, every icon’s box, and a perceptual hash. Boxes are in the space Pointer.* takes by default, so a box’s centre can be clicked as is: a phone’s screen, a browser’s window pixels (its current tab), a computer’s screen pixels (or, with a page’s targetId, that browser’s window pixels).
| Param | Type | Required | Description |
|---|---|---|---|
ocrEngine | string | No |
| Field | Type | Description |
|---|---|---|
texts | ObserveText[] | |
icons | ObserveIcon[] | |
hash | string | |
width | integer | |
height | integer | |
capturedAt | integer | Frame timestamp, epoch-ms (not inference completion). |