Crates.io | ChromedriverManager |
lib.rs | ChromedriverManager |
version | 0.1.0 |
source | src |
created_at | 2023-12-06 04:21:17.016915 |
updated_at | 2023-12-06 04:21:17.016915 |
description | A Rust library for downloading and managing ChromeDrivers. |
homepage | https://github.com/Sw1ndlers/ChromedriverManager |
repository | |
max_upload_size | |
id | 1059684 |
size | 17,484 |
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(())
}