()
| 30 | |
| 31 | #[allow(dead_code)] |
| 32 | pub fn get_selenium_manager() -> Command { |
| 33 | let mut path = PathBuf::from(env!("CARGO_BIN_EXE_selenium-manager")); |
| 34 | |
| 35 | if !path.is_absolute() { |
| 36 | path = std::env::current_dir() |
| 37 | .expect("Unable to get current directory") |
| 38 | .join(path); |
| 39 | } |
| 40 | |
| 41 | if path.exists() { |
| 42 | return Command::new(path); |
| 43 | } |
| 44 | |
| 45 | if cfg!(windows) { |
| 46 | let exe_path = path.with_extension("exe"); |
| 47 | if exe_path.exists() { |
| 48 | return Command::new(exe_path); |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | panic!("Binary not found {}", path_to_string(&path)); |
| 53 | } |
| 54 | |
| 55 | #[allow(dead_code)] |
| 56 | pub fn assert_driver(cmd: &mut Command) { |
no test coverage detected