Summary
I'd like to request a more stable screenshot API in playwright-cli.
Today, playwright-cli screenshot can fail on complex pages because of things like font readiness, pending resource loading, or unstable rendering state.
I also tried bypassing it with run-code + CDP Page.captureScreenshot, but that is still not reliable enough on some real pages.
What I need
I need a screenshot API with this behavior:
- do not wait for page stability
- do not wait for fonts or all resources to finish loading
- just capture whatever is currently rendered in the browser right now
- if the page is partially rendered, that is fine
- if resources are still loading, that is also fine
- returning a valid screenshot is more important than waiting for a "perfect" screenshot
Why this matters
For debugging and E2E evidence collection, an imperfect screenshot is often much better than no screenshot.
Right now, there is no reliable "capture now" API:
- the built-in screenshot path can fail
- direct
run-code + CDP is also not stable enough as a workaround
Request
Could playwright-cli provide a stable screenshot API or mode whose contract is:
capture the current rendered browser frame as-is, without waiting for page stability, font readiness, or resource completion
Something like:
playwright-cli screenshot --capture-now
playwright-cli screenshot --no-wait
playwright-cli screenshot --best-effort
The exact name is not important. The key is to prioritize operational reliability over screenshot completeness.
Summary
I'd like to request a more stable screenshot API in
playwright-cli.Today,
playwright-cli screenshotcan fail on complex pages because of things like font readiness, pending resource loading, or unstable rendering state.I also tried bypassing it with
run-code+ CDPPage.captureScreenshot, but that is still not reliable enough on some real pages.What I need
I need a screenshot API with this behavior:
Why this matters
For debugging and E2E evidence collection, an imperfect screenshot is often much better than no screenshot.
Right now, there is no reliable "capture now" API:
run-code+ CDP is also not stable enough as a workaroundRequest
Could
playwright-cliprovide a stable screenshot API or mode whose contract is:Something like:
playwright-cli screenshot --capture-nowplaywright-cli screenshot --no-waitplaywright-cli screenshot --best-effortThe exact name is not important. The key is to prioritize operational reliability over screenshot completeness.