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