mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Playwright tmp dirs are cleaned up after browser close 🟩
This commit is contained in:
parent
730e2e2f91
commit
d69e8c257f
1 changed files with 7 additions and 0 deletions
|
|
@ -92,5 +92,12 @@ def get_token_from_local_storage(
|
||||||
context.close()
|
context.close()
|
||||||
browser.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:
|
if record_video and video_dir:
|
||||||
logger.info(f"Video(s) saved in: {video_dir}")
|
logger.info(f"Video(s) saved in: {video_dir}")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue