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

Method is_windows_admin

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

Source from the content-addressed store, hash-verified

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