Skip to content

Commit 769cfe5

Browse files
committed
Refactor Chrome options
1 parent b6120ae commit 769cfe5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,10 @@ def _set_chrome_options(
852852
if headless or headless2 or is_using_uc(undetectable, browser_name):
853853
chrome_options.add_argument("--disable-renderer-backgrounding")
854854
chrome_options.add_argument("--disable-backgrounding-occluded-windows")
855+
chrome_options.add_argument(
856+
'--disable-features=OptimizationHintsFetching,'
857+
'OptimizationTargetPrediction'
858+
)
855859
if (
856860
is_using_uc(undetectable, browser_name)
857861
and (
@@ -873,10 +877,6 @@ def _set_chrome_options(
873877
chrome_options.add_argument(
874878
"--disable-autofill-keyboard-accessory-view[8]"
875879
)
876-
chrome_options.add_argument(
877-
'--disable-features=OptimizationHintsFetching,'
878-
'OptimizationTargetPrediction'
879-
)
880880
chrome_options.add_argument("--homepage=about:blank")
881881
chrome_options.add_argument("--dom-automation")
882882
chrome_options.add_argument("--disable-hang-monitor")

0 commit comments

Comments
 (0)