(
html_path: Path, png_path: Path, *, timeout_ms: int
)
| 571 | |
| 572 | |
| 573 | def _screenshot_with_clip_fallback( |
| 574 | html_path: Path, png_path: Path, *, timeout_ms: int |
| 575 | ) -> None: |
| 576 | try: |
| 577 | _screenshot_page(html_path, png_path, timeout_ms=timeout_ms) |
| 578 | except RuntimeError: |
| 579 | print(f" full-page failed, retrying with clip-height {_CLIP_HEIGHT}") |
| 580 | _screenshot_page( |
| 581 | html_path, png_path, timeout_ms=timeout_ms, clip_height=_CLIP_HEIGHT |
| 582 | ) |
| 583 | |
| 584 | |
| 585 | def _rel(from_dir: Path, target: Path) -> str: |
no test coverage detected