webdriver-downloader 0.17.0

Library for webdriver download.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;

#[cfg(target_family = "unix")]
pub use unix_family::*;
#[cfg(target_os = "windows")]
pub use windows::*;

use crate::os_specific::DefaultPathError;

#[cfg(target_family = "unix")]
mod unix_family;
#[cfg(target_os = "windows")]
mod windows;

pub fn default_driver_path() -> Result<PathBuf, DefaultPathError> {
    let home_dir = home::home_dir().ok_or(DefaultPathError::HomeDir)?;
    Ok(home_dir.join("bin").join(DRIVER_EXECUTABLE_NAME))
}