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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//! # Rustenium
//!
//! A modern, high-performance WebDriver BiDi automation library for Rust.
//!
//! ## Features
//!
//! - **WebDriver BiDi Protocol**: Native support for the next-generation WebDriver BiDi protocol
//! - **Chrome/Chromium Support**: Full Chrome and Chromium browser automation
//! - **High-Level API**: Intuitive, ergonomic API for browser automation tasks
//! - **Human-like Input**: Built-in support for realistic mouse movements and interactions
//! - **Touch Support**: Multi-touch gestures and touchscreen simulation
//! - **Network Interception**: Intercept and modify network requests
//! - **Screenshot Capture**: Element and viewport screenshot capabilities
//! - **Event Handling**: Subscribe to browser and page events
//! - **Type-Safe**: Strongly-typed API leveraging Rust's type system
//!
//! ## Quick Start
//!
//! ```no_run
//! use rustenium::browsers::{ChromeBrowser, ChromeConfig, chrome};
//! use rustenium::css;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Option 1: Using ChromeBrowser::new
//! let config = ChromeConfig {
//! driver_executable_path: "chromedriver".to_string(),
//! ..Default::default()
//! };
//! let mut browser = ChromeBrowser::new(config).await;
//!
//! // Option 2: Using chrome helper
//! let mut browser = chrome(None).await; // Uses default config
//!
//! // Navigate to a page
//! browser.open_url("https://example.com", None, None).await?;
//!
//! // Find elements using CSS selectors
//! let nodes = browser.find_nodes(css!("h1"), None, None, None, None).await?;
//!
//! // Get text content
//! if let Some(node) = nodes.first() {
//! let text = node.get_inner_text().await;
//! println!("Heading: {}", text);
//! }
//!
//! // Clean up
//! browser.end_bidi_session().await?;
//!
//! Ok(())
//! }
//! ```
//!
//! ## Main Components
//!
//! - [`browsers::ChromeBrowser`] - Main browser automation interface
//! - [`browsers::ChromeConfig`] - Browser configuration
//! - [`browsers::ChromeCapabilities`] - Browser capabilities builder
//! - [`browsers::chrome()`] - Convenience function to create a browser
//! - [`nodes::ChromeNode`] - DOM element representation for Chrome
//! - [`input::BidiMouse`] - Direct, instant mouse movements for fast automation
//! - [`input::HumanMouse`] - Realistic mouse movements with Bezier curves and jitter
//! - [`input::BidiKeyboard`] - Keyboard input for typing text and pressing keys
//! - [`input::Touchscreen`] - Multi-touch gesture support for mobile testing
//!
//! ## Macros
//!
//! Enable the `macros` feature for convenient selector macros:
//!
//! ```toml
//! [dependencies]
//! rustenium = { version = "1.0.0", features = ["macros"] }
//! ```
//!
//! Then use `css!()` and `xpath!()` macros for element selection.
pub use *;
pub use *;