MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / playwright_chrome

Function playwright_chrome

cli/src/engine.rs:148–161  ·  view source on GitHub ↗

Best-effort lookup of a Playwright-installed Chromium under `~/.cache/ms-playwright/chromium-*/chrome-linux/chrome`.

()

Source from the content-addressed store, hash-verified

146
147/// Best-effort lookup of a Playwright-installed Chromium under `~/.cache/ms-playwright/chromium-*/chrome-linux/chrome`.
148fn playwright_chrome() -> Option<PathBuf> {
149 let root = PathBuf::from(std::env::var_os("HOME")?).join(".cache/ms-playwright");
150 let mut best: Option<PathBuf> = None;
151 for entry in std::fs::read_dir(&root).ok()?.flatten() {
152 let name = entry.file_name();
153 let name = name.to_str()?;
154 if !name.starts_with("chromium-") { continue; }
155 let candidate = entry.path().join("chrome-linux/chrome");
156 if candidate.is_file() && best.as_ref().is_none_or(|b| candidate > *b) {
157 best = Some(candidate);
158 }
159 }
160 best
161}
162
163/// Block until the harness has set `window.__edgeReady = true` (worker created, ready for evals).
164fn wait_ready(tab: &headless_chrome::Tab) -> Result<()> {

Callers 1

resolve_chromeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected