MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / find_driver_in_path

Method find_driver_in_path

rust/src/lib.rs:705–721  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

703 }
704
705 fn find_driver_in_path(&self) -> (Option<String>, Option<String>) {
706 let driver_version_command = Command::new(
707 self.get_driver_name(),
708 vec![String::from(DASH_DASH_VERSION)],
709 );
710 match run_shell_command(driver_version_command) {
711 Ok(output) => {
712 let parsed_version = parse_version(output, self.get_logger()).unwrap_or_default();
713 if !parsed_version.is_empty() {
714 let driver_path = self.execute_which_in_shell(self.get_driver_name());
715 return (Some(parsed_version), driver_path);
716 }
717 (None, None)
718 }
719 Err(_) => (None, None),
720 }
721 }
722
723 fn execute_which_in_shell(&self, arg: &str) -> Option<String> {
724 match which(arg) {

Callers 1

setupMethod · 0.80

Implementers 8

edge.rsrust/src/edge.rs
iexplorer.rsrust/src/iexplorer.rs
safaritp.rsrust/src/safaritp.rs
electron.rsrust/src/electron.rs
chrome.rsrust/src/chrome.rs
firefox.rsrust/src/firefox.rs
grid.rsrust/src/grid.rs
safari.rsrust/src/safari.rs

Calls 6

run_shell_commandFunction · 0.85
parse_versionFunction · 0.85
is_emptyMethod · 0.80
get_driver_nameMethod · 0.45
get_loggerMethod · 0.45

Tested by

no test coverage detected