MCPcopy Create free account
hub / github.com/microsoft/Webwright / _chromium_executable

Function _chromium_executable

src/webwright/tools/persistent_local_browser.py:54–66  ·  view source on GitHub ↗

Locate the Playwright-bundled Chromium executable.

()

Source from the content-addressed store, hash-verified

52
53
54def _chromium_executable() -> str:
55 """Locate the Playwright-bundled Chromium executable."""
56 try:
57 from playwright.sync_api import sync_playwright
58 except ImportError as exc: # pragma: no cover - import guard
59 raise SystemExit(f"error: playwright is not installed: {exc}")
60 with sync_playwright() as p:
61 path = p.chromium.executable_path
62 if not path or not Path(path).exists():
63 raise SystemExit(
64 "error: Playwright chromium binary not found. Run `playwright install chromium`."
65 )
66 return path
67
68
69def _pid_alive(pid: int) -> bool:

Callers 1

_cmd_createFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected