microsoft / microsoft/playwright
Request a stable screenshot API that captures the current rendered frame without waiting for page stability
@dgozman is already working on this.
Since Aug 24, 2026.
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
## 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.