Expand description
§meyerhold
Progressive reader for Playwright MCP snapshot JSON files.
§Usage
use meyerhold::{Meyerhold, ListType};
// Parse from JSON string
let json_str = r#"{"content":[{"text":"snapshot content..."}]}"#;
let mh = Meyerhold::from_str(json_str)?;
// Get summary
let summary = mh.summary();
println!("URL: {}", summary.page_url);
// List elements
let buttons = mh.elements(ListType::Buttons);
for btn in buttons {
println!("[{}] {}", btn.ref_id, btn.label);
}
// Search
let results = mh.search("Sign in", false)?;Structs§
- Element
- An interactive element extracted from snapshot.
- Meyerhold
- Main interface for working with Playwright MCP snapshots.
- Search
Result - A search result with context.
- Snapshot
Summary - Summary information extracted from a snapshot.
Enums§
- Content
Item - Content item representing any element in page/DOM order.
- List
Type - Type of elements to list.
- Meyerhold
Error - Errors that can occur when working with Playwright MCP snapshots.
- Section
- Section types for extraction.
Constants§
- DEFAULT_
TEXT_ CHAR_ LIMIT - Default character limit for text preview.