diff --git a/examples/cdp_mode/ReadMe.md b/examples/cdp_mode/ReadMe.md index c4836064c1c..33e9c2052fa 100644 --- a/examples/cdp_mode/ReadMe.md +++ b/examples/cdp_mode/ReadMe.md @@ -308,7 +308,7 @@ with SB(uc=True, test=True, ad_block=True) as sb: print('*** Walmart Search for "%s":' % search) print(' (Results must contain "%s".)' % required_text) unique_item_text = [] - items = sb.find_elements('div[data-testid="list-view"]') + items = sb.find_elements('div[data-test-id="gpt-main"]') for item in items: if required_text in item.text: description = item.querySelector( diff --git a/examples/cdp_mode/playwright/raw_walmart_sync.py b/examples/cdp_mode/playwright/raw_walmart_sync.py index 0c796ddf6c5..48f82d1857e 100644 --- a/examples/cdp_mode/playwright/raw_walmart_sync.py +++ b/examples/cdp_mode/playwright/raw_walmart_sync.py @@ -21,7 +21,7 @@ print('*** Walmart Search for "%s":' % search) print(' (Results must contain "%s".)' % required_text) unique_item = [] - items = page.locator('div[data-testid="list-view"]') + items = page.locator('div[data-test-id="gpt-main"]') for i in range(items.count()): item = items.nth(i) if required_text in item.inner_text(): diff --git a/examples/cdp_mode/raw_glassdoor.py b/examples/cdp_mode/raw_glassdoor.py index f7caac8cb57..9077885e1d6 100644 --- a/examples/cdp_mode/raw_glassdoor.py +++ b/examples/cdp_mode/raw_glassdoor.py @@ -5,6 +5,7 @@ sb.activate_cdp_mode(url) sb.sleep(1.5) sb.solve_captcha() + sb.sleep(0.5) sb.highlight('[data-test="global-nav-glassdoor-logo"]') sb.highlight('[data-test="site-header-companies"]') sb.highlight('[data-test="search-button"]') diff --git a/examples/cdp_mode/raw_radwell.py b/examples/cdp_mode/raw_radwell.py index 7ba7666f3b8..f440638be44 100644 --- a/examples/cdp_mode/raw_radwell.py +++ b/examples/cdp_mode/raw_radwell.py @@ -3,11 +3,17 @@ with SB(uc=True, test=True, locale="en", incognito=True) as sb: url = "https://www.radwell.com/en-US/Search/Advanced/" sb.activate_cdp_mode(url) - sb.sleep(3) - sb.press_keys("form#basicsearch input", "821C-PM-111DA-142") sb.sleep(1) + sb.press_keys("form#basicsearch input", "821C-PM-111DA-142") sb.click('[value="Search Icon"]') - sb.sleep(3) + sb.sleep(2) + if not sb.is_element_visible("a.manufacturer-link"): + sb.solve_captcha() + sb.sleep(0.5) sb.assert_text("MAC VALVES INC", "a.manufacturer-link") sb.highlight("a.manufacturer-link") + description = sb.get_text("div.product-information") + description = description.replace(" ", "") + description = description.replace("\n \n", "\n") + print(description) sb.sleep(1) diff --git a/examples/cdp_mode/raw_walmart.py b/examples/cdp_mode/raw_walmart.py index daa6b0c317a..5b59d6a41ea 100644 --- a/examples/cdp_mode/raw_walmart.py +++ b/examples/cdp_mode/raw_walmart.py @@ -25,7 +25,7 @@ print('*** Walmart Search for "%s":' % search) print(' (Results must contain "%s".)' % required_text) unique_item_text = [] - items = sb.find_elements('div[data-testid="list-view"]') + items = sb.find_elements('div[data-test-id="gpt-main"]') for item in items: if required_text in item.text: description = item.querySelector( diff --git a/mkdocs_build/requirements.txt b/mkdocs_build/requirements.txt index 3c3537221e4..5aaa7845d97 100644 --- a/mkdocs_build/requirements.txt +++ b/mkdocs_build/requirements.txt @@ -1,7 +1,7 @@ # mkdocs dependencies for generating the seleniumbase.io website # Minimum Python version: 3.10 (for generating docs only) -regex>=2025.11.3 +regex>=2026.1.15 pymdown-extensions>=10.20 pipdeptree>=2.30.0 python-dateutil>=2.8.2 diff --git a/seleniumbase/__version__.py b/seleniumbase/__version__.py index bdfaf02bc56..78c6255030b 100755 --- a/seleniumbase/__version__.py +++ b/seleniumbase/__version__.py @@ -1,2 +1,2 @@ # seleniumbase package -__version__ = "4.45.12" +__version__ = "4.45.13" diff --git a/seleniumbase/undetected/cdp_driver/connection.py b/seleniumbase/undetected/cdp_driver/connection.py index 3757dae6d22..2236ce9048a 100644 --- a/seleniumbase/undetected/cdp_driver/connection.py +++ b/seleniumbase/undetected/cdp_driver/connection.py @@ -593,10 +593,12 @@ async def listener_loop(self): "Connection listener exception " "while reading websocket:\n%s", e ) + self.idle.set() break if not self.running: # If we have been cancelled or otherwise stopped running, # then break this loop. + self.idle.set() break self.idle.clear() # Not "idle" anymore. message = json.loads(msg)