Playwright tmp dirs are cleaned up after browser close 🟩

This commit is contained in:
Daniel Roth 2026-06-04 12:51:14 +00:00
parent bd1fa09dc2
commit 428a5db513

View file

@ -92,5 +92,12 @@ def get_token_from_local_storage(
context.close()
browser.close()
for pattern in (
"/tmp/playwright-artifacts-*",
"/tmp/playwright_chromiumdev_profile-*",
):
for path in glob.glob(pattern):
shutil.rmtree(path, ignore_errors=True)
if record_video and video_dir:
logger.info(f"Video(s) saved in: {video_dir}")