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

Method new_with_name

rust/src/edge.rs:78–96  ·  view source on GitHub ↗
(browser_name: String)

Source from the content-addressed store, hash-verified

76 }
77
78 pub fn new_with_name(browser_name: String) -> Result<Box<Self>, Error> {
79 let static_browser_name: &str = Box::leak(browser_name.into_boxed_str());
80 let driver_name = EDGEDRIVER_NAME;
81 let config = ManagerConfig::default(static_browser_name, driver_name);
82 let default_timeout = config.timeout.to_owned();
83 let default_proxy = &config.proxy;
84 let (tx, rx): (Sender<String>, Receiver<String>) = mpsc::channel();
85 Ok(Box::new(EdgeManager {
86 browser_name: static_browser_name,
87 driver_name,
88 http_client: create_http_client(default_timeout, default_proxy)?,
89 config,
90 log: Logger::new(),
91 tx,
92 rx,
93 download_browser: false,
94 browser_url: None,
95 }))
96 }
97}
98
99impl SeleniumManager for EdgeManager {

Callers

nothing calls this directly

Calls 2

leakFunction · 0.85
create_http_clientFunction · 0.85

Tested by

no test coverage detected