Skip to content

Commit 7238659

Browse files
committed
Refactor Chromium options
1 parent 1e5e688 commit 7238659

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

seleniumbase/core/browser_launcher.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,6 @@ def _set_chrome_options(
842842
chrome_options.add_argument("--disable-prompt-on-repost")
843843
chrome_options.add_argument("--dns-prefetch-disable")
844844
chrome_options.add_argument("--disable-translate")
845-
chrome_options.add_argument(
846-
'--disable-features=OptimizationHints,OptimizationHintsFetching,'
847-
'OptimizationGuideModelDownloading,OptimizationTargetPrediction'
848-
)
849845
if binary_location:
850846
chrome_options.binary_location = binary_location
851847
if not enable_3d_apis and not is_using_uc(undetectable, browser_name):
@@ -874,6 +870,10 @@ def _set_chrome_options(
874870
chrome_options.add_argument(
875871
"--disable-autofill-keyboard-accessory-view[8]"
876872
)
873+
chrome_options.add_argument(
874+
'--disable-features=OptimizationHintsFetching,'
875+
'OptimizationTargetPrediction'
876+
)
877877
chrome_options.add_argument("--homepage=about:blank")
878878
chrome_options.add_argument("--dom-automation")
879879
chrome_options.add_argument("--disable-hang-monitor")
@@ -2422,6 +2422,10 @@ def get_local_driver(
24222422
edge_options.add_argument(
24232423
"--disable-autofill-keyboard-accessory-view[8]"
24242424
)
2425+
edge_options.add_argument(
2426+
'--disable-features=OptimizationHintsFetching,'
2427+
'OptimizationTargetPrediction'
2428+
)
24252429
edge_options.add_argument("--disable-browser-side-navigation")
24262430
edge_options.add_argument("--disable-translate")
24272431
if binary_location:

0 commit comments

Comments
 (0)