I'm using this code I found on this page to save browser context after running the code:
user_dir = '/tmp/playwright'
with sync_playwright() as p:
browser = p.chromium.launch_persistent_context(user_dir, headless=False)
page = browser.new_page()
But when I try to change the directory from the /tmp/playwright
folder, which is created in C:
, to the current folder where I'm running the code (user_dir = './tmp/playwright'
), the two folders are created but the playwright folder has nothing inside!
Does anyone know how to solve it? Thanks in advance!