File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -670,6 +670,9 @@ def _set_chrome_options(
670
670
chrome_options .add_argument ("--disable-translate" )
671
671
if not enable_3d_apis :
672
672
chrome_options .add_argument ("--disable-3d-apis" )
673
+ if headless or headless2 or is_using_uc (undetectable , browser_name ):
674
+ chrome_options .add_argument ("--disable-renderer-backgrounding" )
675
+ chrome_options .add_argument ("--disable-backgrounding-occluded-windows" )
673
676
if (
674
677
is_using_uc (undetectable , browser_name )
675
678
and (
@@ -2062,6 +2065,9 @@ def get_local_driver(
2062
2065
edge_options .add_argument ("--disable-prompt-on-repost" )
2063
2066
if not enable_3d_apis :
2064
2067
edge_options .add_argument ("--disable-3d-apis" )
2068
+ if headless or headless2 or is_using_uc (undetectable , browser_name ):
2069
+ edge_options .add_argument ("--disable-renderer-backgrounding" )
2070
+ edge_options .add_argument ("--disable-backgrounding-occluded-windows" )
2065
2071
if (
2066
2072
selenium4_or_newer
2067
2073
and page_load_strategy
Original file line number Diff line number Diff line change @@ -225,8 +225,6 @@ def __init__(
225
225
"--password-store=basic" ,
226
226
]
227
227
)
228
- options .add_argument ("--disable-renderer-backgrounding" )
229
- options .add_argument ("--disable-backgrounding-occluded-windows" )
230
228
if headless or options .headless :
231
229
options .headless = True
232
230
options .add_argument ("--no-sandbox" )
You can’t perform that action at this time.
0 commit comments