firefox_webdriver/browser/
mod.rs

1//! Browser entities module.
2//!
3//! This module provides the core browser automation types:
4//!
5//! | Type | Description |
6//! |------|-------------|
7//! | [`Window`] | Browser window (owns Firefox process, references shared pool) |
8//! | [`Tab`] | Browser tab (frame context) |
9//! | [`Element`] | DOM element reference |
10//!
11//! # Example
12//!
13//! ```no_run
14//! use firefox_webdriver::{Driver, Result};
15//!
16//! # async fn example() -> Result<()> {
17//! let driver = Driver::builder()
18//!     .binary("/usr/bin/firefox")
19//!     .extension("./extension")
20//!     .build()
21//!     .await?;
22//!
23//! let window = driver.window().headless().spawn().await?;
24//! let tab = window.tab();
25//!
26//! tab.goto("https://example.com").await?;
27//! let element = tab.find_element("h1").await?;
28//! let text = element.get_text().await?;
29//! # Ok(())
30//! # }
31//! ```
32
33// ============================================================================
34// Submodules
35// ============================================================================
36
37/// DOM element interaction.
38pub mod element;
39
40/// Network interception types.
41pub mod network;
42
43/// Proxy configuration types.
44pub mod proxy;
45
46/// Browser tab automation.
47pub mod tab;
48
49/// Browser window management.
50pub mod window;
51
52// ============================================================================
53// Re-exports
54// ============================================================================
55
56pub use element::Element;
57pub use network::{
58    BodyAction, HeadersAction, InterceptedRequest, InterceptedRequestBody,
59    InterceptedRequestHeaders, InterceptedResponse, InterceptedResponseBody, RequestAction,
60    RequestBody, ResponseAction,
61};
62pub use proxy::{ProxyConfig, ProxyType};
63pub use tab::{FrameInfo, Tab};
64pub use window::{Window, WindowBuilder};
65
66// Re-export Cookie from protocol for convenience
67pub use crate::protocol::Cookie;