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

Method is_windows_admin

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

Source from the content-addressed store, hash-verified

736 }
737
738 fn is_windows_admin(&self) -> bool {
739 let os = self.get_os();
740 if WINDOWS.is(os) {
741 let command = Command::new("net", vec![String::from("session")]);
742 let output = run_shell_command(command).unwrap_or_default();
743 !output.is_empty() && !output.contains("error") && !output.contains("not recognized")
744 } else {
745 false
746 }
747 }
748
749 fn is_safari(&self) -> bool {
750 self.get_browser_name().contains(SAFARI_NAME)

Callers 1

download_browserMethod · 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 4

run_shell_commandFunction · 0.85
get_osMethod · 0.80
is_emptyMethod · 0.80
isMethod · 0.65

Tested by

no test coverage detected