| Crates.io | chrome-driver-rs |
| lib.rs | chrome-driver-rs |
| version | 0.1.2 |
| created_at | 2025-09-19 02:37:24.621749+00 |
| updated_at | 2025-09-19 02:56:45.948289+00 |
| description | ChromeDriver latest version downloader & manager for Rust |
| homepage | |
| repository | https://github.com/kyunghyunHan/chrome_driver_rs |
| max_upload_size | |
| id | 1845693 |
| size | 57,434 |
A lightweight Rust library to automatically download, install, and verify the latest ChromeDriver for macOS (Intel/ARM) and Windows.
This library is especially useful when you need a ready-to-use ChromeDriver for projects using Selenium or thirtyfour without manual installation.
Add this crate to your Cargo.toml:
[dependencies]
chrome-driver-rs = "0.1"
tokio = { version = "1", features = ["full"] }
reqwest = { version = "0.11", features = ["json"] }
zip = "0.6"
serde_json = "1"
use chrome_driver_rs::{ensure_latest_driver, check_version};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Download and install the latest ChromeDriver
let driver_info = ensure_latest_driver("./driver").await?;
println!("ChromeDriver path: {}", driver_info.driver_path);
println!("Installed version: {}", driver_info.version);
// (Optional) Verify that the driver is working
check_version(&driver_info.driver_path).await?;
Ok(())
}
This will:
./driver folder.thirtyfouruse chrome_driver_rs::ensure_latest_driver;
use thirtyfour::prelude::*;
#[tokio::main]
async fn main() -> WebDriverResult<()> {
let driver = ensure_latest_driver("./driver").await?;
let caps = DesiredCapabilities::chrome();
let webdriver = WebDriver::new("http://localhost:9515", caps).await?;
webdriver.goto("https://www.google.com").await?;
println!("Chrome opened successfully!");
webdriver.quit().await?;
Ok(())
}
Licensed under either of