chore: Use WEBDRIVER_OPTION_ARGS with Playwright (#26315)

This commit is contained in:
Kamil Gabryjelski 2023-12-20 12:42:12 +01:00 committed by GitHub
parent eb65cea971
commit 3f9183a162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -137,7 +137,8 @@ class WebDriverPlaywright(WebDriverProxy):
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
)