claude-in-chrome: no way to set an exact page viewport size (no DevTools device-toolbar / CDP emulation access)
Open 💬 0 comments Opened Jul 6, 2026 by marsmichelmann
When using the claude-in-chrome MCP tools for browser automation/UI testing, there's no reliable way to set an exact CSS-pixel viewport size for the page under test.
resize_windowonly resizes the OS browser window (outerWidth/outerHeight), not the actual page viewport. In practice the extension's own UI (side panel) eats into the available width, so requesting e.g. 1920x1080 can result in a much smaller actual page viewport (observed ~1745x704 in one session) - and the offset isn't constant across sessions/targets, so it can't be reliably compensated for.- There's no exposed tool for Chrome's DevTools Device Toolbar (responsive design mode) or the underlying CDP
Emulation.setDeviceMetricsOverride, which is what the Device Toolbar uses internally. - Impact: testing at a specific target resolution (e.g. a project's "Full HD 1920x1080" design target, or standard responsive breakpoints) can't be done end-to-end by the agent - it has to ask the human to manually open DevTools and set the size themselves.
Feature request: expose a tool that sets an exact page viewport size independent of the OS window/extension chrome - ideally backed by CDP device-metrics override - so automated testing can target exact resolutions reliably, matching what the DevTools Device Toolbar already does manually.