[Launch options](https://cdpfleet.com/docs/options)

# `screen_size`

Resolution of the session's own display (headful only).

**Use it for:** Responsive and visual tests at a given resolution, and personas that need a common desktop or laptop screen instead of the server default.

**Browsers:** [Google Chrome](https://cdpfleet.com/docs/browsers/chrome#opt-screen_size), [Microsoft Edge](https://cdpfleet.com/docs/browsers/edge#opt-screen_size), [Brave](https://cdpfleet.com/docs/browsers/brave#opt-screen_size), [Opera](https://cdpfleet.com/docs/browsers/opera#opt-screen_size), [Naver Whale](https://cdpfleet.com/docs/browsers/whale#opt-screen_size), [Yandex Browser](https://cdpfleet.com/docs/browsers/yandex#opt-screen_size), [Chromium](https://cdpfleet.com/docs/browsers/chromium#opt-screen_size), [Patchright](https://cdpfleet.com/docs/browsers/patchright#opt-screen_size), [Rebrowser](https://cdpfleet.com/docs/browsers/rebrowser#opt-screen_size), [Camoufox](https://cdpfleet.com/docs/browsers/camoufox#opt-screen_size), [Firefox](https://cdpfleet.com/docs/browsers/firefox#opt-screen_size), [WebKit](https://cdpfleet.com/docs/browsers/webkit#opt-screen_size).

## Details

-   **Type:** `"WxH" | { width, height }`
-   **Default:** the server's display (1280×720 window)
-   **Example:** `{"screen_size":"1366x768"}`

Sets the screen the browser runs on, from 640×480 to 3840×2160, e.g. `"1366x768"` or `{ "width": 1920, "height": 1080 }`. Pages see it as `screen.width`/`height`; Chromium windows open at that size (Playwright then resizes each context's window to its viewport — use `viewport: null` to keep the full display, in live view and recordings too); Camoufox pins its fingerprint screen to it unless you pass `screen`.

Headful sessions only — a headless launch with `screen_size` returns 400. Playwright contexts report a screen equal to their viewport (1280×720) unless you open them with `viewport: null` (Python `no_viewport=True`, Java `setViewportSize(null)`, C# `ViewportSize = ViewportSize.NoViewport`, Go `NoViewport: playwright.Bool(true)`); Camoufox always reports the display — the nearest real-world screen size no larger than it (exact for common sizes such as 1366×768 or 1920×1080); with `"os": "macos"` use 1440×900 or larger, since no Mac screen is smaller (400 otherwise).

## Used in

-   [Headful Chrome on a full-HD screen](https://cdpfleet.com/docs/examples#chrome-screen-size)

All options: [launch options](https://cdpfleet.com/docs/options).

---
Source: https://cdpfleet.com/docs/options/screen_size · Markdown: https://cdpfleet.com/docs/options/screen_size.md · All docs for AI tools: https://cdpfleet.com/llms.txt
