Skip to content

Commit 0866985

Browse files
committed
Handle edge case for proxy server with auth using remote headless Chrome
1 parent 5abb012 commit 0866985

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,13 @@ def get_remote_driver(
240240
downloads_path, proxy_string, proxy_auth,
241241
proxy_user, proxy_pass)
242242
if headless:
243-
chrome_options.add_argument("--headless")
243+
if not proxy_auth:
244+
# Headless Chrome doesn't support extensions, which are
245+
# required when using a proxy server that has authentication.
246+
# Instead, base_case.py will use PyVirtualDisplay when not
247+
# using Chrome's built-in headless mode. See link for details:
248+
# https://bugs.chromium.org/p/chromium/issues/detail?id=706008
249+
chrome_options.add_argument("--headless")
244250
chrome_options.add_argument("--disable-gpu")
245251
chrome_options.add_argument("--no-sandbox")
246252
capabilities = chrome_options.to_capabilities()

0 commit comments

Comments
 (0)