From dcae72a5e773de2610bc91d7bd5812cf56be44a5 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Sun, 7 Sep 2025 10:52:06 +0200 Subject: [PATCH] fix: use png screenshot type after Playwright v1.55.0 alignment --- .../pytest_playwright_asyncio/pytest_playwright.py | 1 + pytest-playwright/pytest_playwright/pytest_playwright.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pytest-playwright-asyncio/pytest_playwright_asyncio/pytest_playwright.py b/pytest-playwright-asyncio/pytest_playwright_asyncio/pytest_playwright.py index 738b243..9c165c7 100644 --- a/pytest-playwright-asyncio/pytest_playwright_asyncio/pytest_playwright.py +++ b/pytest-playwright-asyncio/pytest_playwright_asyncio/pytest_playwright.py @@ -600,6 +600,7 @@ async def on_will_close_browser_context(self, context: BrowserContext) -> None: await page.screenshot( timeout=5000, path=screenshot_path, + type="png", full_page=self._pytestconfig.getoption( "--full-page-screenshot" ), diff --git a/pytest-playwright/pytest_playwright/pytest_playwright.py b/pytest-playwright/pytest_playwright/pytest_playwright.py index 430303d..ec362fa 100644 --- a/pytest-playwright/pytest_playwright/pytest_playwright.py +++ b/pytest-playwright/pytest_playwright/pytest_playwright.py @@ -595,6 +595,7 @@ def on_will_close_browser_context(self, context: BrowserContext) -> None: page.screenshot( timeout=5000, path=screenshot_path, + type="png", full_page=self._pytestconfig.getoption( "--full-page-screenshot" ),