🚀 Feature Request
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.
Example
await page.screencast.start({path: 'video.webm'});
await page.getByRole('button', {name: 'close window'}).click(); // close window
// video.webm file is automatically saved
Motivation
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."
🚀 Feature Request
Suppose recording is started using
page.screencast.start({path: videoPath}). If the page closes beforepage.screencast.stop()is called to stop the recording, I would like the recording to stop automatically and the video file to be saved.Example
Motivation
To control the recording area, I want to start recording using
screencast.start()rather than thenewContext()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."