Implementation:Microsoft Playwright Public Protocol Types
| Knowledge Sources | |
|---|---|
| Domains | TypeDefinitions, ChromiumProtocol, PublicAPI |
| Last Updated | 2026-02-12 00:00 GMT |
Overview
Auto-generated TypeScript type definitions for the Chrome DevTools Protocol (CDP), published as part of the playwright-core package's public types.
Description
This file (~23,824 lines) is generated by /utils/protocol-types-generator/index.js and is identical in content to the internal Chromium protocol types at src/server/chromium/protocol.d.ts. It is placed under types/ to be included in the published playwright-core npm package, making CDP types available to consumers who use Playwright's CDP session API.
All types are organized under the Protocol namespace with sub-namespaces for each CDP domain (Accessibility, CSS, DOM, Debugger, Emulation, Input, Network, Page, Runtime, Target, etc.).
This file is referenced by the companion types/types.d.ts via:
import { Protocol } from './protocol';
This makes Protocol types available on CDP session return types and event payloads in the public Playwright API.
Usage
These types are consumed by TypeScript users who interact with Chrome DevTools Protocol sessions through Playwright's CDPSession API. When calling cdpSession.send() or handling CDP events, these types provide autocompletion and compile-time checking for CDP commands and their parameters.
Code Reference
Source Location
- Repository: Microsoft_Playwright
- File:
packages/playwright-core/types/protocol.d.ts
Import
// Typically consumed indirectly through Playwright's CDPSession API
import { Protocol } from 'playwright-core/types/protocol';
Generation
# This file is auto-generated; do not edit manually
# Generated by: /utils/protocol-types-generator/index.js