SDK: Disable browser logs (#3958)

This commit is contained in:
Stanislav Novosad
2025-11-11 09:32:49 -07:00
committed by GitHub
parent f038b281c1
commit 688224caa8
3 changed files with 5 additions and 1 deletions

View File

@@ -267,7 +267,8 @@ class BrowserContextFactory:
if not creator:
raise UnknownBrowserType(browser_type)
browser_context, browser_artifacts, cleanup_func = await creator(playwright, **kwargs)
set_browser_console_log(browser_context=browser_context, browser_artifacts=browser_artifacts)
if settings.BROWSER_LOGS_ENABLED:
set_browser_console_log(browser_context=browser_context, browser_artifacts=browser_artifacts)
set_download_file_listener(browser_context=browser_context, **kwargs)
proxy_location: ProxyLocation | None = kwargs.get("proxy_location")