Crate browser_commander

Crate browser_commander 

Source
Expand description

Browser Commander - Universal Browser Automation Library

A Rust library for browser automation that provides a unified API for different browser automation engines.

§Features

  • Unified API across multiple browser engines
  • Built-in navigation safety handling
  • Element visibility and scroll management
  • Click, fill, and other interaction support with verification
  • Async/await support with Tokio

§Example

use browser_commander::browser::{LaunchOptions, launch_browser};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Launch a browser
    let options = LaunchOptions::chromiumoxide()
        .headless(true);

    let result = launch_browser(options).await?;
    println!("Browser launched: {:?}", result.browser.engine);

    Ok(())
}

§Modules

  • core - Core types and traits (constants, engine adapter, logger)
  • elements - Element operations (selectors, visibility, content)
  • interactions - User interactions (click, scroll, fill)
  • browser - Browser management (launcher, navigation)
  • utilities - General utilities (URL handling, wait operations)
  • high_level - High-level DRY utilities

Re-exports§

pub use browser::launch_browser;
pub use browser::Browser;
pub use browser::LaunchOptions;
pub use browser::LaunchResult;
pub use core::EngineAdapter;
pub use core::EngineError;
pub use core::EngineType;
pub use core::Logger;
pub use core::LoggerOptions;
pub use core::Timing;
pub use core::CHROME_ARGS;
pub use core::TIMING;

Modules§

browser
Browser management for browser automation.
core
Core functionality for browser automation.
elements
Element operations for browser automation.
high_level
High-level operations for browser automation.
interactions
Interaction operations for browser automation.
prelude
Prelude module for convenient imports.
utilities
Utilities for browser automation.