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

Function _resolve_image_path

src/webwright/tools/image_qa.py:33–41  ·  view source on GitHub ↗
(image_path: str, workspace_dir: str = "")

Source from the content-addressed store, hash-verified

31
32
33def _resolve_image_path(image_path: str, workspace_dir: str = "") -> Path:
34 path = Path(image_path)
35 if not path.is_absolute():
36 base_dir = Path(workspace_dir) if workspace_dir else Path.cwd()
37 path = base_dir / path
38 path = path.resolve()
39 if not path.exists():
40 raise FileNotFoundError(f"Image path does not exist: {path}")
41 return path
42
43
44def _normalize_image_paths(

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected