You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📊 <ahref="https://github.com/seleniumbase/SeleniumBase/"><btranslate="no">SeleniumBase</b></a> is a complete framework for browser automation activities. It supports <ahref="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a>, which makes it easy to scale testing. Includes advanced tools for reporting, script-generation, JavaScript manipulation, and stealthy automation.
55
+
📊 <ahref="https://github.com/seleniumbase/SeleniumBase/"><btranslate="no">SeleniumBase</b></a> is a complete framework for browser automation activities. It supports <ahref="https://docs.pytest.org/en/latest/how-to/usage.html">pytest</a>, which makes it easy to scale testing. Includes advanced tools for reporting, script-generation, and stealthy automation.
56
56
57
-
🐙 Stealth modes: <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">UC Mode</a> and <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> can bypass bot-detection, handle CAPTCHAs, and call methods from the <ahref="https://chromedevtools.github.io/devtools-protocol/"translate="no">Chrome Devtools Protocol</a>. Includes <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md"><b><spantranslate="no">Stealthy Playwright Mode</span></b></a>, which makes Playwright stealthy via CDP Mode.
57
+
🐙 Stealth modes: <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md">UC Mode</a> and <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md"><b>CDP Mode</b></a> can bypass bot-detection, handle CAPTCHAs, and call methods from the <ahref="https://chromedevtools.github.io/devtools-protocol/"translate="no">Chrome Devtools Protocol</a>. CDP Mode includes <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md"><b><spantranslate="no">Stealthy Playwright Mode</span></b></a>, which makes Playwright stealthy.
58
58
59
-
📚 Example scripts and tests are located in [**SeleniumBase/examples/**](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
59
+
📚 Example scripts and tests are located in [**SeleniumBase/examples/**](https://github.com/seleniumbase/SeleniumBase/tree/master/examples). (Tests run with `pytest`)
60
60
61
61
🥷 Stealthy example scripts are located in [**SeleniumBase/examples/cdp_mode/**](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/cdp_mode).
62
62
63
63
--------
64
64
65
-
<palign="left">📗 This script performs a Google Search using SeleniumBase UC Mode + CDP Mode:<br /><ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">SeleniumBase/examples/raw_google.py</a> (Results are saved as PDF, HTML, and PNG)</p>
65
+
<palign="left">📓 Here's the stealthy architecture overview:</p>
(For maximum stealth, use <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">CDP Mode</a>, which includes <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md">Stealthy Playwright</a>)
70
+
71
+
--------
72
+
73
+
Here's a [Pure CDP Mode](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md#Pure_CDP_Mode) example of scraping Hacker News:
<palign="left">📗 Here's a Google Search with UC + CDP Mode:<br /><ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py">SeleniumBase/examples/raw_google.py</a> (Results are saved as PDF, HTML, and PNG)</p>
66
90
67
91
```python
68
92
from seleniumbase importSB
@@ -82,7 +106,7 @@ with SB(uc=True, test=True) as sb:
82
106
83
107
> `python raw_google.py`
84
108
85
-
<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><imgsrc="https://seleniumbase.github.io/cdn/img/google_sb_result.jpg"alt="SeleniumBase on Google"title="SeleniumBase on Google"width="580" /></a>
109
+
<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_google.py"><imgsrc="https://seleniumbase.github.io/cdn/img/google_sb_result.jpg"alt="SeleniumBase on Google"title="SeleniumBase on Google"width="500" /></a>
86
110
87
111
--------
88
112
@@ -106,7 +130,9 @@ with SB(uc=True, test=True, locale="en") as sb:
<palign="left">📙 There's also SeleniumBase's "Pure CDP Mode", which doesn't use WebDriver or Selenium at all: <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_gitlab.py">SeleniumBase/examples/cdp_mode/raw_cdp_gitlab.py</a></p>
133
+
----
134
+
135
+
<palign="left">📙 Here's a "Pure CDP Mode" example that handles a CAPTCHA page: <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/raw_cdp_gitlab.py">SeleniumBase/examples/cdp_mode/raw_cdp_gitlab.py</a></p>
110
136
111
137
```python
112
138
from seleniumbase import sb_cdp
@@ -182,14 +208,6 @@ pytest test_demo_site.py
182
208
183
209
--------
184
210
185
-
<palign="left">📓 Here's a high-level stealthy architecture overview of SeleniumBase:</p>
(For maximum stealth, use <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/ReadMe.md">CDP Mode</a>, which is used by <atranslate="no"href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/cdp_mode/playwright/ReadMe.md">Stealthy Playwright Mode</a>)
<btranslate="no">Pure CDP Mode</b> doesn't use WebDriver for anything. The browser is launched using CDP, and all browser actions are performed using CDP (or <code>PyAutoGUI</code>). Initialization:
586
+
In <btranslate="no">Pure CDP Mode</b>, the browser is launched using CDP, and all browser actions are performed using CDP. WebDriver isn't available at all, but SeleniumBase can still use <code>PyAutoGUI</code> methods as needed. Pure CDP Mode initialization:
0 commit comments