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

Method get_url_or_default

rust/src/lib.rs:1516–1527  ·  view source on GitHub ↗
(&'a self, value_url: &'a str, default_url: &'a str)

Source from the content-addressed store, hash-verified

1514 }
1515
1516 fn get_url_or_default<'a>(&'a self, value_url: &'a str, default_url: &'a str) -> String {
1517 let url = if value_url.is_empty() {
1518 default_url
1519 } else {
1520 value_url
1521 };
1522 if !url.ends_with('/') {
1523 format!("{}/", url)
1524 } else {
1525 url.to_string()
1526 }
1527 }
1528
1529 fn canonicalize_path(&self, path_buf: PathBuf) -> String {
1530 let mut canon_path = path_to_string(&path_buf);

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 1

is_emptyMethod · 0.80

Tested by

no test coverage detected