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

Method configure_browser_in_cache

rust/src/chrome.rs:270–288  ·  view source on GitHub ↗

Chrome's sandboxed services need an AppContainer ACL on the install directory, which the installer normally grants; setup.exe ships in the CfT zip to grant it on an unpacked copy.

(&self, browser_path_in_cache: &Path)

Source from the content-addressed store, hash-verified

268 // Chrome's sandboxed services need an AppContainer ACL on the install directory, which the
269 // installer normally grants; setup.exe ships in the CfT zip to grant it on an unpacked copy.
270 fn configure_browser_in_cache(&self, browser_path_in_cache: &Path) {
271 let setup = browser_path_in_cache.join("setup.exe");
272 if !WINDOWS.is(self.get_os()) || !setup.exists() {
273 return;
274 }
275 let argument = format!(
276 "--configure-browser-in-directory={}",
277 browser_path_in_cache.display()
278 );
279 self.get_logger()
280 .debug(format!("Running command: {} {}", setup.display(), argument));
281 let outcome = match Command::new(&setup).arg(&argument).status() {
282 Ok(status) if status.success() => return,
283 Ok(status) => format!("setup.exe exited with {status}"),
284 Err(err) => err.to_string(),
285 };
286 self.get_logger()
287 .warn(format!("Unable to configure the Chrome sandbox: {outcome}"));
288 }
289
290 fn get_browser_name(&self) -> &str {
291 self.browser_name

Callers

nothing calls this directly

Calls 8

get_osMethod · 0.80
existsMethod · 0.80
isMethod · 0.65
debugMethod · 0.45
get_loggerMethod · 0.45
statusMethod · 0.45
successMethod · 0.45
warnMethod · 0.45

Tested by

no test coverage detected