Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions examples/cdp_mode/playwright/raw_clearcote_sync.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
from playwright.sync_api import sync_playwright
from seleniumbase import sb_cdp

sb = sb_cdp.Chrome()
endpoint_url = sb.get_endpoint_url()

with sync_playwright() as p:
browser = p.chromium.connect_over_cdp(endpoint_url)
page = browser.contexts[0].pages[0]
page.goto("https://www.clearcotelabs.com/audit")
sb.click('button[aria-label="Marker 1"]')
sb.click('button[aria-label="Marker 2"]')
sb.click('button[aria-label="Marker 3"]')
sb.press_keys("input", "audit")
sb.set_value('input[type="range"]', "100")
sb.click_and_hold("button[data-interaction-hold]")
sb.select_option_by_text("select", "Mouse")
sb.click('button:contains("Run the audit")')
sb.sleep(6)
sb.assert_element("div.text-successText", timeout=8)
try:
sb.assert_text("100", "div.text-successText", timeout=5)
sb.highlight('div.text-successText:contains("100")')
print(" ✅ The browser fingerprint is clean! Score: 100")
except Exception:
score = sb.get_text("div.text-successText")
print(f" ❌ Fingerprint tampering detected! Score: {score}")
sb.sleep(1)
17 changes: 17 additions & 0 deletions examples/cdp_mode/raw_cdp_facebook.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from seleniumbase import sb_cdp

sb = sb_cdp.Chrome(ad_block=True)
sb.goto("https://www.facebook.com/SeleniumBase")
sb.sleep(3)
sb.click_if_visible('[aria-label="Close"] i', timeout=2)
sb.sleep(1)
sb.click_if_visible('[aria-label="Close"] i')
for i in range(18):
sb.scroll_down(14)
sb.sleep(0.12)
print(sb.get_page_title())
sb.save_as_pdf_to_logs()
sb.save_page_source_to_logs()
sb.save_screenshot_to_logs()
print("Logs have been saved to: ./latest_logs/")
sb.quit()
2 changes: 2 additions & 0 deletions examples/cdp_mode/raw_facebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

with SB(uc=True, test=True, ad_block=True) as sb:
sb.activate_cdp_mode()
sb.sleep(3)
sb.goto("https://www.facebook.com/SeleniumBase")
sb.sleep(1)
sb.click_if_visible('[aria-label="Close"] i', timeout=2)
sb.sleep(1)
sb.click_if_visible('[aria-label="Close"] i')
for i in range(18):
sb.scroll_down(14)
print(sb.get_page_title())
Expand Down
2 changes: 1 addition & 1 deletion examples/cdp_mode/raw_kohls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from seleniumbase import SB

with SB(uc=True, test=True, locale="en", incognito=True) as sb:
with SB(uc=True, test=True, locale="en") as sb:
search = "Mickey Mouse Blanket"
req_1 = "Mickey"
req_2 = "Blanket"
Expand Down
10 changes: 5 additions & 5 deletions help_docs/ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<a href="https://seleniumbase.io/help_docs/syntax_formats/">🔠 Syntax Formats</a> |
<a href="https://seleniumbase.io/integrations/github/workflows/ReadMe/">🤖 CI/CD</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Boilerplates</a> |
<a href="https://seleniumbase.io/help_docs/boilerplates/">♻️ Boilerplates</a> |
<a href="https://seleniumbase.io/help_docs/locale_codes/">🗾 Locale Codes</a>
<br />
<a href="https://seleniumbase.io/help_docs/js_package_manager/">🟨 JS Manager</a> |
Expand All @@ -35,15 +35,15 @@
<a href="https://seleniumbase.io/help_docs/recorder_mode/">🔴 Recorder</a> |
<a href="https://seleniumbase.io/devices/?url=seleniumbase.io">🖥️ Device Farm</a>
<br />
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md">🎭 Stealthy Playwright Mode</a>
<a href="https://seleniumbase.io/examples/cdp_mode/playwright/ReadMe/">🎭 Stealthy Playwright Mode</a>
<br />
<a href="https://seleniumbase.io/examples/presenter/ReadMe/">🎞️ Slides</a> |
<a href="https://seleniumbase.io/examples/chart_maker/ReadMe/">📶 Chart Maker</a>
<br / >
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/commander.md">🎖️ GUI</a> |
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">👤 UC Mode</a>
<a href="https://seleniumbase.io/help_docs/commander/">🎖️ GUI</a> |
<a href="https://seleniumbase.io/help_docs/uc_mode/">👤 UC Mode</a>
<br / >
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/cdp_mode_methods.md">📘 Stealth API</a>
<a href="https://seleniumbase.io/help_docs/cdp_mode_methods/">📘 Stealth API</a>
<br />
<a href="https://seleniumbase.io/examples/cdp_mode/ReadMe/">🐙 CDP Mode</a>
</p>
Expand Down
4 changes: 2 additions & 2 deletions mkdocs_build/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

regex>=2026.7.19
pymdown-extensions>=10.21.3
pipdeptree>=4.1.0
pipdeptree>=4.2.0
python-dateutil>=2.8.2
click>=8.4.2
Markdown==3.10.2
Markdown==3.10.3
ghp-import==2.1.0
watchdog==6.0.0
cairocffi==1.7.1
Expand Down
11 changes: 6 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pip>=26.0.1;python_version<"3.10"
pip>=26.1.2;python_version>="3.10"
pip>=26.2;python_version>="3.10"
packaging>=26.2
setuptools~=70.2;python_version<"3.10"
setuptools>=83.0.0;python_version>="3.10"
Expand All @@ -8,9 +8,10 @@ attrs>=26.1.0
certifi>=2026.7.22
exceptiongroup>=1.3.1
websockets~=15.0.1;python_version<"3.10"
websockets>=16.1.1;python_version>="3.10"
websockets~=16.1.1;python_version=="3.10"
websockets>=17.0.1;python_version>="3.11"
filelock~=3.19.1;python_version<"3.10"
filelock>=3.32.0;python_version>="3.10"
filelock>=3.32.2;python_version>="3.10"
fasteners>=0.20
mycdp>=1.4.0
pynose>=1.5.5
Expand Down Expand Up @@ -48,7 +49,7 @@ websocket-client~=1.9.0
selenium==4.32.0;python_version<"3.10"
selenium==4.46.0;python_version>="3.10"
cssselect==1.3.0;python_version<"3.10"
cssselect>=1.4.0,<2;python_version>="3.10"
cssselect>=1.5.0,<2;python_version>="3.10"
sortedcontainers==2.4.0
execnet==2.1.1;python_version<"3.10"
execnet==2.1.2;python_version>="3.10"
Expand Down Expand Up @@ -81,7 +82,7 @@ rich>=15.0.0,<16
# ("pip install -r requirements.txt" also installs this, but "pip install -e ." won't.)

coverage>=7.10.7;python_version<"3.10"
coverage>=7.15.2;python_version>="3.10"
coverage>=7.15.3;python_version>="3.10"
pytest-cov>=7.1.0
flake8==7.3.0
mccabe==0.7.0
Expand Down
2 changes: 1 addition & 1 deletion seleniumbase/__version__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# seleniumbase package
__version__ = "4.51.8"
__version__ = "4.51.9"
2 changes: 1 addition & 1 deletion seleniumbase/undetected/cdp_driver/cdp_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ async def start(
proxy_scheme,
)
elif proxy:
proxy = proxy_helper.validate_proxy_string(proxy_string)
proxy = proxy_helper.validate_proxy_string(proxy)
if "binary_location" in kwargs and not browser_executable_path:
browser_executable_path = kwargs["binary_location"]
if not user_data_dir and "--user-data-dir" in arg_join:
Expand Down
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
python_requires=">=3.9",
install_requires=[
'pip>=26.0.1;python_version<"3.10"',
'pip>=26.1.2;python_version>="3.10"',
'pip>=26.2;python_version>="3.10"',
'packaging>=26.2',
'setuptools~=70.2;python_version<"3.10"', # Newer ones had issues
'setuptools>=83.0.0;python_version>="3.10"',
Expand All @@ -172,9 +172,10 @@
'certifi>=2026.7.22',
'exceptiongroup>=1.3.1',
'websockets~=15.0.1;python_version<"3.10"',
'websockets>=16.1.1;python_version>="3.10"',
'websockets~=16.1.1;python_version=="3.10"',
'websockets>=17.0.1;python_version>="3.11"',
'filelock~=3.19.1;python_version<"3.10"',
'filelock>=3.32.0;python_version>="3.10"',
'filelock>=3.32.2;python_version>="3.10"',
'fasteners>=0.20',
'mycdp>=1.4.0',
'pynose>=1.5.5',
Expand Down Expand Up @@ -212,7 +213,7 @@
'selenium==4.32.0;python_version<"3.10"',
'selenium==4.46.0;python_version>="3.10"',
'cssselect==1.3.0;python_version<"3.10"',
'cssselect>=1.4.0,<2;python_version>="3.10"',
'cssselect>=1.5.0,<2;python_version>="3.10"',
'sortedcontainers==2.4.0',
'execnet==2.1.1;python_version<"3.10"',
'execnet==2.1.2;python_version>="3.10"',
Expand Down Expand Up @@ -254,7 +255,7 @@
# Usage: coverage run -m pytest; coverage html; coverage report
"coverage": [
'coverage>=7.10.7;python_version<"3.10"',
'coverage>=7.15.2;python_version>="3.10"',
'coverage>=7.15.3;python_version>="3.10"',
'pytest-cov>=7.1.0',
],
# pip install -e .[flake8]
Expand All @@ -275,7 +276,7 @@
"pdfminer": [
'pdfminer.six==20251107;python_version<"3.10"',
'pdfminer.six==20260107;python_version>="3.10"',
'cryptography==49.0.0',
'cryptography==50.0.0',
'cffi==2.0.0;python_version<"3.10"',
'cffi==2.1.0;python_version>="3.10"',
'pycparser==2.23;python_version<"3.10"',
Expand Down Expand Up @@ -303,7 +304,7 @@
# (For the Playwright integration.)
"playwright": [
'playwright>=1.60.0;python_version<"3.10"',
'playwright>=1.61.0;python_version>="3.10"',
'playwright>=1.62.0;python_version>="3.10"',
'greenlet>=3.2.5;python_version<"3.10"',
'greenlet>=3.5.4;python_version>="3.10"',
],
Expand Down