Skip to content

Commit 81292e7

Browse files
authored
Merge pull request #2202 from seleniumbase/remove-ad-privacy-pop-up
Prevent the "Enhanced ad privacy" pop-up from appearing
2 parents bf6ae85 + 29de3ea commit 81292e7

File tree

5 files changed

+24
-14
lines changed

5 files changed

+24
-14
lines changed

help_docs/method_summary.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,8 +1006,6 @@ driver.uc_open_with_tab(url)
10061006
driver.uc_open_with_reconnect(url, reconnect_time=None)
10071007

10081008
driver.uc_click(selector)
1009-
1010-
############
10111009
```
10121010

10131011
--------

help_docs/recorder_mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
<img src="https://seleniumbase.github.io/cdn/img/sb_recorder_notification.png" title="SeleniumBase" width="380">
1111

12-
ℹ️ Recorder Mode can be activated from the command-line interface, or from the Recorder Desktop App.
12+
⏺️ Recorder Mode can be activated from the command-line interface or the Recorder Desktop App.
1313

14-
⏺️ To make a new recording from the command-line interface, use ``sbase mkrec``, ``sbase codegen``, or ``sbase record``):
14+
⏺️ To make a new recording from the command-line interface, use ``sbase mkrec``, ``sbase codegen``, or ``sbase record``:
1515

1616
```bash
1717
sbase mkrec TEST_NAME.py --url=URL

mkdocs_build/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
regex>=2023.10.3
55
PyYAML>=6.0.1
6-
pymdown-extensions>=10.3
6+
pymdown-extensions>=10.3.1
77
pipdeptree>=2.13.0
88
python-dateutil>=2.8.2
99
Markdown==3.5

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.20.4"
2+
__version__ = "4.20.5"

seleniumbase/core/browser_launcher.py

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,10 +1030,16 @@ def _set_chrome_options(
10301030
if headless or headless2 or is_using_uc(undetectable, browser_name):
10311031
chrome_options.add_argument("--disable-renderer-backgrounding")
10321032
chrome_options.add_argument("--disable-backgrounding-occluded-windows")
1033-
chrome_options.add_argument(
1034-
'--disable-features=OptimizationHintsFetching,'
1035-
'OptimizationTargetPrediction'
1036-
)
1033+
if user_data_dir:
1034+
chrome_options.add_argument(
1035+
"--disable-features=OptimizationHintsFetching,"
1036+
"OptimizationTargetPrediction,PrivacySandboxSettings4"
1037+
)
1038+
else:
1039+
chrome_options.add_argument(
1040+
"--disable-features=OptimizationHintsFetching,"
1041+
"OptimizationTargetPrediction"
1042+
)
10371043
if (
10381044
is_using_uc(undetectable, browser_name)
10391045
and (
@@ -2458,10 +2464,16 @@ def get_local_driver(
24582464
edge_options.add_argument(
24592465
"--disable-autofill-keyboard-accessory-view[8]"
24602466
)
2461-
edge_options.add_argument(
2462-
'--disable-features=OptimizationHintsFetching,'
2463-
'OptimizationTargetPrediction'
2464-
)
2467+
if user_data_dir:
2468+
edge_options.add_argument(
2469+
"--disable-features=OptimizationHintsFetching,"
2470+
"OptimizationTargetPrediction,PrivacySandboxSettings4"
2471+
)
2472+
else:
2473+
edge_options.add_argument(
2474+
"--disable-features=OptimizationHintsFetching,"
2475+
"OptimizationTargetPrediction"
2476+
)
24652477
edge_options.add_argument("--disable-browser-side-navigation")
24662478
edge_options.add_argument("--disable-translate")
24672479
if not enable_ws:

0 commit comments

Comments
 (0)