From 3f9183a1628672d22e97284dfe9046d77a09e9fe Mon Sep 17 00:00:00 2001 From: Kamil Gabryjelski Date: Wed, 20 Dec 2023 12:42:12 +0100 Subject: [PATCH] chore: Use WEBDRIVER_OPTION_ARGS with Playwright (#26315) --- superset/utils/webdriver.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superset/utils/webdriver.py b/superset/utils/webdriver.py index f7814bfd3b9a1..4552600fc9f1c 100644 --- a/superset/utils/webdriver.py +++ b/superset/utils/webdriver.py @@ -137,7 +137,8 @@ def get_screenshot( # pylint: disable=too-many-locals, too-many-statements self, url: str, element_name: str, user: User ) -> bytes | None: with sync_playwright() as playwright: - browser = playwright.chromium.launch() + browser_args = current_app.config["WEBDRIVER_OPTION_ARGS"] + browser = playwright.chromium.launch(args=browser_args) pixel_density = current_app.config["WEBDRIVER_WINDOW"].get( "pixel_density", 1 )