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

Method is_windows_admin

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

Source from the content-addressed store, hash-verified

760 }
761
762 fn is_windows_admin(&self) -> bool {
763 let os = self.get_os();
764 if WINDOWS.is(os) {
765 let command = Command::new("net", vec![String::from("session")]);
766 let output = run_shell_command(command).unwrap_or_default();
767 !output.is_empty() && !output.contains("error") && !output.contains("not recognized")
768 } else {
769 false
770 }
771 }
772
773 fn is_safari(&self) -> bool {
774 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