From 591585099a95742c902e6b3e171c08bbd4202e2a Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 5 Oct 2025 21:33:38 -0400 Subject: [PATCH 1/4] Update CDP Mode --- seleniumbase/core/browser_launcher.py | 5 ++++- seleniumbase/undetected/cdp_driver/config.py | 15 +++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/seleniumbase/core/browser_launcher.py b/seleniumbase/core/browser_launcher.py index 4a01222d6a0..18d1983fe4d 100644 --- a/seleniumbase/core/browser_launcher.py +++ b/seleniumbase/core/browser_launcher.py @@ -2664,6 +2664,8 @@ def _set_chrome_options( included_disabled_features.append(item) d_f_string = ",".join(included_disabled_features) chrome_options.add_argument("--disable-features=%s" % d_f_string) + if proxy_auth: + chrome_options.add_argument("--test-type") if ( is_using_uc(undetectable, browser_name) and ( @@ -2681,7 +2683,8 @@ def _set_chrome_options( chrome_options.add_argument("--disable-popup-blocking") # Skip remaining options that trigger anti-bot services return chrome_options - chrome_options.add_argument("--test-type") + if not proxy_auth: + chrome_options.add_argument("--test-type") chrome_options.add_argument("--log-level=3") chrome_options.add_argument("--no-first-run") chrome_options.add_argument("--allow-insecure-localhost") diff --git a/seleniumbase/undetected/cdp_driver/config.py b/seleniumbase/undetected/cdp_driver/config.py index 2315a311aac..846c35fec77 100644 --- a/seleniumbase/undetected/cdp_driver/config.py +++ b/seleniumbase/undetected/cdp_driver/config.py @@ -150,11 +150,6 @@ def __init__( "--disable-renderer-backgrounding", "--disable-background-networking", "--disable-dev-shm-usage", - "--disable-features=IsolateOrigins,site-per-process,Translate," - "InsecureDownloadWarnings,DownloadBubble,DownloadBubbleV2," - "OptimizationTargetPrediction,OptimizationGuideModelDownloading," - "SidePanelPinning,UserAgentClientHint,PrivacySandboxSettings4," - "DisableLoadExtensionCommandLineSwitch", ] @property @@ -202,7 +197,15 @@ def __call__(self): # By the time it starts, the port is probably already taken. args = self._default_browser_args.copy() args += ["--user-data-dir=%s" % self.user_data_dir] - args += ["--disable-features=IsolateOrigins,site-per-process"] + args += [ + "--disable-features=IsolateOrigins,site-per-process,Translate," + "InsecureDownloadWarnings,DownloadBubble,DownloadBubbleV2," + "OptimizationTargetPrediction,OptimizationGuideModelDownloading," + "SidePanelPinning,UserAgentClientHint,PrivacySandboxSettings4," + "DisableLoadExtensionCommandLineSwitch" + ] + if self.proxy: + args += ["--test-type"] args += ["--disable-session-crashed-bubble"] if self.expert: args += [ From f1056470bb8ebf5adf724c85ae5484120e79c15a Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 5 Oct 2025 21:35:00 -0400 Subject: [PATCH 2/4] Update CDP Mode examples --- examples/cdp_mode/ReadMe.md | 6 ++++++ examples/cdp_mode/raw_footlocker.py | 4 ++-- examples/cdp_mode/raw_indeed.py | 2 +- examples/cdp_mode/raw_theaters.py | 2 ++ examples/cdp_mode/raw_walmart.py | 6 ++++++ examples/cdp_mode/raw_wsform.py | 3 ++- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/examples/cdp_mode/ReadMe.md b/examples/cdp_mode/ReadMe.md index a4b14841ca5..5eaf8925295 100644 --- a/examples/cdp_mode/ReadMe.md +++ b/examples/cdp_mode/ReadMe.md @@ -283,6 +283,12 @@ with SB(uc=True, test=True, ad_block=True) as sb: required_text = "Catan" sb.cdp.press_keys('input[aria-label="Search"]', search + "\n") sb.sleep(3.8) + if sb.is_element_visible("#px-captcha"): + sb.cdp.gui_click_and_hold("#px-captcha", 12) + sb.sleep(3.2) + if sb.is_element_visible("#px-captcha"): + sb.cdp.gui_click_and_hold("#px-captcha", 12) + sb.sleep(3.2) sb.cdp.remove_elements('[data-testid="skyline-ad"]') print('*** Walmart Search for "%s":' % search) print(' (Results must contain "%s".)' % required_text) diff --git a/examples/cdp_mode/raw_footlocker.py b/examples/cdp_mode/raw_footlocker.py index cd2672fd7b5..8db0e64a5d8 100644 --- a/examples/cdp_mode/raw_footlocker.py +++ b/examples/cdp_mode/raw_footlocker.py @@ -6,10 +6,10 @@ sb.sleep(2.5) sb.cdp.click_if_visible('button[id*="Agree"]') sb.sleep(1.5) - sb.cdp.mouse_click('input[aria-label="Search"]') + sb.cdp.mouse_click('input[name="query"]') sb.sleep(1.5) search = "Nike Shoes" - sb.cdp.press_keys('input[aria-label="Search"]', search) + sb.cdp.press_keys('input[name="query"]', search) sb.sleep(2.5) sb.cdp.mouse_click('ul[id*="typeahead"] li div') sb.sleep(3.5) diff --git a/examples/cdp_mode/raw_indeed.py b/examples/cdp_mode/raw_indeed.py index 54d0b303f24..a69ec0e9cb2 100644 --- a/examples/cdp_mode/raw_indeed.py +++ b/examples/cdp_mode/raw_indeed.py @@ -3,7 +3,7 @@ with SB(uc=True, test=True) as sb: url = "https://www.indeed.com/companies/search" sb.activate_cdp_mode(url) - search_box = 'input[data-testid="company-search-box"]' + search_box = "input#company-search" if not sb.is_element_present(search_box): sb.sleep(2) sb.uc_gui_click_captcha() diff --git a/examples/cdp_mode/raw_theaters.py b/examples/cdp_mode/raw_theaters.py index bb5d51c7c6d..c51bb0071b3 100644 --- a/examples/cdp_mode/raw_theaters.py +++ b/examples/cdp_mode/raw_theaters.py @@ -4,7 +4,9 @@ with SB(uc=True, test=True, locale="en", ad_block=True) as sb: url = "https://architectureofcities.com/roman-theaters" sb.activate_cdp_mode(url) + sb.sleep(0.5) sb.cdp.click_if_visible("#cn-close-notice") + sb.cdp.click_if_visible('[aria-label="Reject All"]') sb.cdp.click_if_visible('span:contains("Continue")') sb.sleep(1) print("*** " + sb.cdp.get_text("h1") + " ***") diff --git a/examples/cdp_mode/raw_walmart.py b/examples/cdp_mode/raw_walmart.py index a343f1d9677..6ba0524f93a 100644 --- a/examples/cdp_mode/raw_walmart.py +++ b/examples/cdp_mode/raw_walmart.py @@ -12,6 +12,12 @@ required_text = "Catan" sb.cdp.press_keys('input[aria-label="Search"]', search + "\n") sb.sleep(3.8) + if sb.is_element_visible("#px-captcha"): + sb.cdp.gui_click_and_hold("#px-captcha", 12) + sb.sleep(3.2) + if sb.is_element_visible("#px-captcha"): + sb.cdp.gui_click_and_hold("#px-captcha", 12) + sb.sleep(3.2) sb.cdp.remove_elements('[data-testid="skyline-ad"]') print('*** Walmart Search for "%s":' % search) print(' (Results must contain "%s".)' % required_text) diff --git a/examples/cdp_mode/raw_wsform.py b/examples/cdp_mode/raw_wsform.py index 605867858a2..5ee9647f2a5 100644 --- a/examples/cdp_mode/raw_wsform.py +++ b/examples/cdp_mode/raw_wsform.py @@ -3,6 +3,7 @@ with SB(uc=True, test=True, locale="en", incognito=True) as sb: url = "https://wsform.com/demo/" sb.activate_cdp_mode(url) + sb.sleep(1) sb.scroll_into_view("div.grid") sb.uc_gui_click_captcha() - sb.sleep(1) + sb.sleep(2) From 44e708122628ef7c3f1e79bc763b80eb390736e7 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 5 Oct 2025 21:35:31 -0400 Subject: [PATCH 3/4] Refresh Python dependencies --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index af8acb51b65..28f95bedb0f 100755 --- a/requirements.txt +++ b/requirements.txt @@ -5,7 +5,7 @@ setuptools~=70.2;python_version<"3.10" setuptools>=80.9.0;python_version>="3.10" wheel>=0.45.1 attrs>=25.3.0 -certifi>=2025.8.3 +certifi>=2025.10.5 exceptiongroup>=1.3.0 websockets~=13.1;python_version<"3.9" websockets>=15.0.1;python_version>="3.9" diff --git a/setup.py b/setup.py index f1538a259e6..6aaef5b4569 100755 --- a/setup.py +++ b/setup.py @@ -153,7 +153,7 @@ 'setuptools>=80.9.0;python_version>="3.10"', 'wheel>=0.45.1', 'attrs>=25.3.0', - "certifi>=2025.8.3", + "certifi>=2025.10.5", "exceptiongroup>=1.3.0", 'websockets~=13.1;python_version<"3.9"', 'websockets>=15.0.1;python_version>="3.9"', From d9e368348fac8622b2d7448ce4ea0a36476bd820 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Sun, 5 Oct 2025 21:35:57 -0400 Subject: [PATCH 4/4] Version 4.42.1 --- seleniumbase/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index 987eaa421ab..03340df3a52 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.42.0" +__version__ = "4.42.1"