viewpoint-cdp 0.2.3

Low-level Chrome DevTools Protocol implementation over WebSocket
Documentation

viewpoint-cdp

Low-level Chrome DevTools Protocol (CDP) implementation over WebSocket for Rust.

This crate provides the foundational CDP communication layer for the Viewpoint browser automation framework.

Features

  • WebSocket-based CDP connection
  • Async message sending and receiving
  • Event subscription support
  • Protocol domain implementations (Page, Runtime, Network, Input, Target)

Usage

This crate is primarily used internally by viewpoint-core. For browser automation, use viewpoint-test instead.

use viewpoint_cdp::{Connection, CdpError};

// Connect to a running Chrome instance
let connection = Connection::new("ws://localhost:9222/devtools/page/...").await?;

// Send CDP commands
let result = connection.send("Page.navigate", json!({"url": "https://example.com"})).await?;

License

MIT