1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Chrome DevTools Protocol (CDP) support.
//!
//! Two entry points:
//!
//! - [`Cdp`](crate::cdp::Cdp) — request/response over the WebDriver vendor
//! endpoint `goog/cdp/execute`. Available on any Chromium-based session
//! (chromedriver, msedgedriver, Brave, Opera, etc.). Get one with
//! [`crate::WebDriver::cdp`].
//! - [`CdpSession`](crate::cdp::CdpSession) (feature `cdp-events`) — a
//! WebSocket-backed flat-mode CDP session with **event subscription**.
//! Open one with [`Cdp::connect`](crate::cdp::Cdp::connect) when you need
//! to listen for events like `Network.requestWillBeSent` or
//! `Page.lifecycleEvent`.
//!
//! ## Typed vs untyped
//!
//! Every command in [`domains`](crate::cdp::domains) is a Rust struct that
//! implements [`CdpCommand`](crate::cdp::CdpCommand), pairing the request
//! type with its response type and the wire method name. Calls flow through
//! one entry point:
//!
//! ```no_run
//! # use thirtyfour::prelude::*;
//! # async fn run(driver: WebDriver) -> WebDriverResult<()> {
//! use thirtyfour::cdp::domains::network::NetworkConditions;
//! driver.cdp().network().clear_browser_cache().await?;
//! driver.cdp().network().emulate_network_conditions(NetworkConditions {
//! offline: false,
//! latency: 200,
//! download_throughput: 256 * 1024,
//! upload_throughput: 64 * 1024,
//! connection_type: None,
//! }).await?;
//! # Ok(()) }
//! ```
//!
//! For commands not in the curated set under [`domains`](crate::cdp::domains),
//! use the untyped escape hatch [`Cdp::send_raw`](crate::cdp::Cdp::send_raw)
//! or implement [`CdpCommand`](crate::cdp::CdpCommand) yourself.
pub use ;
pub use CdpError;
pub use Cdp;
pub use ;
pub use CdpSession;
pub use EventStream;