-
Notifications
You must be signed in to change notification settings - Fork 5.1k
chore: update video api and implementation #39054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Path is available once video file is created. - No `path` option when stopping, use `saveAs()` instead. - More tests around edge cases.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
e952824 to
ddf0ad2
Compare
Test results for "tests 1"4 failed 5 flaky34256 passed, 662 skipped Merge workflow run. |
Test results for "MCP"7 failed 1 flaky3607 passed, 129 skipped Merge workflow run. |
| // ... perform actions ... | ||
| await page.video().stop({ path: 'video.webm' }); | ||
| await page.video().stop(); | ||
| await page.video().saveAs('video.webm'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really unusual API for us, we recommend to always write 2 lines instead of passing path into one. screenshot({ path }), pdf({ path }), etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will follow up!
page.video()is always available.video.path()is available right away upon recording, and throws when no video is being recorded.pathoption when stopping, usesaveAs()instead.page did not produce any video frameserror anymore - add a single white frame instead.