From e36e0fe3e10c3e4eeb89d36bc2c20b3a7e278d6d Mon Sep 17 00:00:00 2001 From: Andrew Collier Date: Thu, 29 May 2025 14:31:35 +0100 Subject: [PATCH] fix: Return None if headless (cherry picked from commit bd319ec988cba981dcb0d96ad9d2aec731faa36f) --- pythonlib/camoufox/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonlib/camoufox/utils.py b/pythonlib/camoufox/utils.py index 537562e..887048c 100644 --- a/pythonlib/camoufox/utils.py +++ b/pythonlib/camoufox/utils.py @@ -330,7 +330,7 @@ def get_screen_cons(headless: Optional[bool] = None) -> Optional[Screen]: Bounds are CSS pixels, the unit Firefox lays its windows out in -- see camoufox.display for why that differs from the monitor's physical size. """ - if headless is False: + if headless is True: return None # Skip if headless display = largest_display() if display is None: