Of the 5 Browser methods, browser sessions serve 4, phone sessions 0 and computer sessions 4. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.

Browser.getVersion

Browser: served Phone: not served Computer: served The browser’s product name, version and user agent, as the build reports them.
{"id": 1, "method": "Browser.getVersion", "params": {}}
No params. Result
FieldTypeDescription
productstring
versionstring
userAgentstring

Browser.setPermission

Browser: not served Phone: not served Computer: not served Pre-answer a site permission for this session: granted, denied, or prompt to reset it. A permission nobody set behaves as in a fresh browser profile (prompt); if a page asks, the prompt is dismissed, as a person closing it would, and the state stays prompt.
{"id": 1, "method": "Browser.setPermission", "params": {"origin": "<origin>", "permission": "geolocation", "setting": "granted"}}
ParamTypeRequiredDescription
originstringYese.g. “https://example.com”.
permissionstringYesOne of geolocation, notifications, camera, microphone, clipboardRead, clipboardWrite, midi, storageAccess.
settingstringYesOne of granted, denied, prompt.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result: an empty object {}.

Browser.readDownload

Browser: served Phone: not served Computer: served Read a completed download’s bytes (Page.waitForDownload’s downloadId), length bytes from offset: 1 MiB by default, at most 4 MiB. Read on from nextOffset until it is absent.
{"id": 1, "method": "Browser.readDownload", "params": {"downloadId": "<downloadId>"}}
ParamTypeRequiredDescription
downloadIdstringYes
offsetintegerNo
lengthintegerNoBytes to read; 0 means 1 MiB. From 0 to 4194304.
Result
FieldTypeDescription
contentBase64string
sizeBytesintegerThe whole download’s size.
nextOffsetintegerWhere the next piece starts; absent after the last.

Browser.stageUpload

Browser: served Phone: not served Computer: served Write a file into the session’s upload folder for Locator.setInputFiles to pick by name. One command carries at most about 128 KiB of content, so a larger file goes in several calls with append; the first call (without append) replaces anything staged under the name. A file is limited to 32 MiB.
{"id": 1, "method": "Browser.stageUpload", "params": {"name": "href", "contentBase64": "aGVsbG8="}}
ParamTypeRequiredDescription
namestringYesA plain file name, such as “report.pdf”; no folders.
contentBase64stringYesThe bytes to write
appendbooleanNoAdd to what is already staged under name instead of replacing it.
Result
FieldTypeDescription
namestring
sizeBytesintegerThe staged file’s size so far.

Browser.setViewport

Browser: served Phone: not served Computer: served Resize the browser window so the page’s viewport is width by height CSS pixels, for every tab. A size larger than the monitor allows (less the browser’s own UI) or smaller than the browser’s minimum window is clamped, so the result is the geometry the session got, the same numbers Device.info reports from then on. The session pixel ratio does not change. The live-view frame changes size with the window: screenshots, Screen.observe and window-pixel coordinates use the new frame, and a live view pauses for 1 to 3 seconds while its stream restarts at the new size.
{"id": 1, "method": "Browser.setViewport", "params": {"width": 1280, "height": 800}}
ParamTypeRequiredDescription
widthintegerYesThe viewport width in CSS pixels.
heightintegerYesThe viewport height in CSS pixels.
idempotencyKeystringNoMakes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys.
Result
FieldTypeDescription
viewportSizeThe page’s viewport in CSS pixels, as measured after the resize.
windowBboxThe browser’s visible window on the monitor, in monitor pixels, as Device.info reports it.
frameSizeThe live-view frame’s new size, the space screenshots and window-pixel coordinates now use.