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

Method find_browser_in_path

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

Source from the content-addressed store, hash-verified

700 }
701
702 fn find_browser_in_path(&self) -> Option<PathBuf> {
703 for browser_name in self.get_browser_names_in_path().iter() {
704 self.get_logger()
705 .trace(format!("Checking {} in PATH", browser_name));
706 let browser_path = self.execute_which_in_shell(browser_name);
707 if let Some(path) = browser_path {
708 self.get_logger()
709 .debug(format!("Found {} in PATH: {}", browser_name, &path));
710 if self.is_snap(&path)
711 && let Some(snap_path) = self.get_snap_path()
712 && snap_path.exists()
713 {
714 self.get_logger().debug(format!(
715 "Using {} snap: {}",
716 browser_name,
717 path_to_string(snap_path.as_path())
718 ));
719 return Some(snap_path);
720 }
721 return Some(Path::new(&path).to_path_buf());
722 }
723 }
724 self.get_logger()
725 .debug(format!("{} not found in PATH", self.get_browser_name()));
726 None
727 }
728
729 fn find_driver_in_path(&self) -> (Option<String>, Option<String>) {
730 let driver_version_command = Command::new(

Callers 1

detect_browser_pathMethod · 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 8

traceMethod · 0.80
existsMethod · 0.80
get_loggerMethod · 0.45
debugMethod · 0.45
is_snapMethod · 0.45
get_snap_pathMethod · 0.45

Tested by

no test coverage detected