-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Description
I'm unable to record a video with Firefox. Here's my script:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
for browser_type in [p.chromium, p.firefox, p.webkit]:
print(f'Starting {browser_type.name}')
browser = browser_type.launch()
context = browser.new_context(record_video_dir=f'videos-{browser_type.name}/', record_video_size={'width': 640, 'height': 360})
page = context.new_page()
page.goto('http://playwright.dev')
page.wait_for_timeout(1000)
page.screenshot(path=f'example-{browser_type.name}.png')
context.close()
print(f'Ending {browser_type.name}')
The script runs successfully, but no video is created for Firefox. Videos are created for Chromium and Webkit. Screenshots are created successfully for all 3 browsers.
System info
- Playwright Version: v1.39.0
- Operating System: Ubuntu 20.04.6, macOS 13.5
- Browser: Firefox
- Other info: Tested with Python 3.11.6 (macOS) and 3.8.10 (Ubuntu)
Steps
- Save the code above in
firefox_video.py
python firefox_video.py
Expected
I expect to see a video file in the directory videos-firefox
.
Actual
No video is saved to videos-firefox
.