Expand description
§Resource blocking
§Wait strategies
PageHandle exposes three wait strategies via WaitUntil:
DomContentLoaded— fires when the HTML is parsed
§Example
use stygian_browser::{BrowserPool, BrowserConfig};
use stygian_browser::page::{ResourceFilter, WaitUntil};
use std::time::Duration;
let pool = BrowserPool::new(BrowserConfig::default()).await?;
let handle = pool.acquire().await?;
let mut page = handle.browser().expect("valid browser").new_page().await?;
page.set_resource_filter(ResourceFilter::block_media()).await?;
page.navigate("https://example.com", WaitUntil::DomContentLoaded, Duration::from_secs(30)).await?;
let title = page.title().await?;
println!("title: {title}");
handle.release().await;Structs§
- Node
Handle - more CDP
Runtime.callFunctionOncalls against the held V8 remote object reference — no HTML serialisation occurs. - Page
Handle - Example
- Resource
Filter - Example
Enums§
- Resource
Type - CDP resource types that can be intercepted.
- Wait
Until - Example