import { CodeBlock } from "@/components/code-block"; export default function CDPMode() { return (

CDP Mode

Connect to an existing browser via Chrome DevTools Protocol:

Use cases

This enables control of:

  • Electron apps
  • Chrome/Chromium with remote debugging
  • WebView2 applications
  • Any browser exposing a CDP endpoint

Global options

Option Description
--session <name> Use isolated session
--headers <json> HTTP headers scoped to origin
--executable-path Custom browser executable
--json JSON output for agents
--full, -f Full page screenshot
--name, -n Locator name filter
--exact Exact text match
--headed Show browser window
--cdp <port> CDP connection port
--debug Debug output
); }