← Back to microsoft/playwright
microsoft / playwright · Issue No. 41608
Suppose recording is started using page.screencast.start({path: videoPath}). If the page closes before page.screencast.stop() is called to stop the recording, I would like the recording to stop automatically and the video file to be saved.
await page.screencast.start({path: 'video.webm'});
await page.getByRole('button', {name: 'close window'}).click(); // close window
// video.webm file is automatically saved
To control the recording area, I want to start recording using screencast.start() rather than the newContext() options.
However, this requires calling screencast.stop() before the page closes.
This makes it impossible to record a video showing "the window closing when a button is pressed."
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.