You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def run(playwright: Playwright) -> None:
browser = playwright.chromium.launch(headless=False)
context = browser.new_context(
viewport={"width": 1920, "height": 1080},
record_video_dir="temp_videos/",
record_video_size={"width": 1920, "height": 1080})
# Open new page
page = context.new_page()
# ---------------------
# page.video.save_as("test.webm")
# OR
# page.video.delete()
context.close()
browser.close()
with sync_playwright() as playwright:
run(playwright)
Describe the bug
Execution will hang, no stack trace will be produced when user tries to save video or delete video before closing the page (page.close)
Uncomment line 15 or 17 to reproduce
The docs for save_as suggest that it should be possible:
"Saves the video to a user-specified path. It is safe to call this method while the video is still in progress, or after the page has closed. "
Still in progress suggests that I do not need to page.close() first