← Back to microsoft/playwright
microsoft / playwright · Issue No. 41532
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.
I need a screenshot API with this behavior:
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 workaroundCould 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-nowplaywright-cli screenshot --no-waitplaywright-cli screenshot --best-effortThe exact name is not important. The key is to prioritize operational reliability over screenshot completeness.
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.