Closed
Description
openedon Jul 19, 2024
Version
1.45.0
Steps to reproduce
- run the following script
from playwright.sync_api import sync_playwright
import time
sync_playwright_started = sync_playwright().start()
binary_path = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
context = sync_playwright_started.chromium.launch_persistent_context(headless=True,
executable_path=binary_path,
record_video_dir='video',
user_data_dir=SPECIFY_YOUR_DATA_DIR
)
- Notice it hangs forever
- Run the same script above, having remove the
record_video_dir
option - Notice it does not hang
Expected behavior
I expect to be able to record a video outside a test.
Actual behavior
The program execution hangs
Additional context
This issue makes me think that playwright intentionally does not support recording video outside a test context?
If so, I respect the design choice, but would be grateful for pointers as to how to make it work for me, outside the test context (I am happy with a messy solution).
Environment
MacOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels