#chromedriver #thirtyfour #download #manager #handler #chrome #launch

yanked ChromedriverManager

A Rust library for downloading and managing ChromeDrivers

0.1.0 Dec 6, 2023

#6 in #thirtyfour

MIT license

16KB
354 lines

Chromedriver Manager

use thirtyfour::prelude::*;

// Require the Handler
use chromedriver_manager::manager::Handler; 

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Create Chrome capabilities
    let mut caps = DesiredCapabilities::chrome(); 

    // Launch chromedriver on port 9515 
    Handler::new()
        .launch_chromedriver(&mut caps, "9515") 
        .await?;

    // Connect to chrome on the same port
    let driver = WebDriver::new("http://localhost:9515", caps).await?; 

    Ok(())
}

Dependencies

~20–34MB
~518K SLoC