The documentation says to use downloadsPath but when I try it like that it gives an unexpected argument. Instead I have it like this but I dont believe the downloads are actually going in the path
user_data_dir = r"C:\Users\WORKPC\AppData\Local\Google\Chrome\User Data"
# Define the directory path
downloads_path = './Videos/'
with sync_playwright() as p:
# Launch a persistent context with user data directory
browser = p.chromium.launch_persistent_context(
user_data_dir,
headless=False,
downloads_path=downloads_path # Specify the downloads directory
)
page = browser.new_page()```