0.1.0 |
|
---|
#5 in #thirtyfour
16KB
354 行
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("https://127.0.0.1:9515", caps).await?;
Ok(())
}
依赖项
~18–32MB
~507K SLoC