Experiment

CDP (Chrome DevTools Protocol)

definitionopsbrowser-automationprotocol

The protocol for controlling Chrome programmatically. How the lab automates a real browser.

CDP is the protocol that powers Chrome’s DevTools, now exposed for programmatic use. Instead of clicking buttons in DevTools, you send JSON commands over a WebSocket: “navigate to this URL,” “click this element,” “read the DOM.” Chrome executes exactly what you ask. The key advantage over Selenium or Playwright’s default mode: CDP talks to a real Chrome browser with a real user profile, cookies, and history : to the website it looks like a normal person, not a bot. CDP can also pierce shadow DOM boundaries using DOM.getDocument({pierce: true}).

How It Works

Connect to Chrome on a debug port (typically 9222), then send {method: "Page.navigate", params: {url: "..."}} style JSON messages and receive streaming events back. Domains organize capabilities: Page, DOM, Network, Runtime, Input.

Example

The jobs-apply project uses CDP to control real Chrome instances for automated job applications. Each platform (LinkedIn, Greenhouse, Lever, Workday) gets its own Chrome process with a cloned user profile. In LinkedIn Run 10, CDP shadow DOM piercing was the key fix that achieved a 100% submission rate.