Skip to content

Commit 6230b61

Browse files
committed
Update the default Chrome switches
1 parent 22c2dd1 commit 6230b61

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ def _set_chrome_options(
110110
}
111111
chrome_options.add_experimental_option("prefs", prefs)
112112
chrome_options.add_experimental_option("w3c", True)
113+
chrome_options.add_experimental_option(
114+
"excludeSwitches", ["enable-automation"])
115+
chrome_options.add_experimental_option("useAutomationExtension", False)
113116
if enable_sync:
114117
chrome_options.add_experimental_option(
115118
"excludeSwitches", ["disable-sync"])
@@ -159,9 +162,10 @@ def _set_chrome_options(
159162
# https://bugs.chromium.org/p/chromium/issues/detail?id=706008
160163
chrome_options.add_argument("--headless")
161164
chrome_options.add_argument("--disable-gpu")
162-
chrome_options.add_argument("--no-sandbox")
163165
if "linux" in PLATFORM:
164-
chrome_options.add_argument("--disable-dev-shm-usage")
166+
chrome_options.add_argument("--no-sandbox")
167+
if "linux" in PLATFORM:
168+
chrome_options.add_argument("--disable-dev-shm-usage")
165169
return chrome_options
166170

167171

0 commit comments

Comments
 (0)