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

Method new_with_name

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

Source from the content-addressed store, hash-verified

90 }
91
92 pub fn new_with_name(browser_name: String) -> Result<Box<Self>, Error> {
93 let static_browser_name: &str = Box::leak(browser_name.into_boxed_str());
94 let driver_name = EDGEDRIVER_NAME;
95 let config = ManagerConfig::default(static_browser_name, driver_name);
96 let default_timeout = config.timeout.to_owned();
97 let default_proxy = &config.proxy;
98 let (tx, rx): (Sender<String>, Receiver<String>) = mpsc::channel();
99 Ok(Box::new(EdgeManager {
100 browser_name: static_browser_name,
101 driver_name,
102 http_client: create_http_client(default_timeout, default_proxy)?,
103 config,
104 log: Logger::new(),
105 tx,
106 rx,
107 download_browser: false,
108 browser_url: None,
109 }))
110 }
111}
112
113impl SeleniumManager for EdgeManager {

Callers

nothing calls this directly

Calls 2

leakFunction · 0.85
create_http_clientFunction · 0.85

Tested by

no test coverage detected