Skip to content

Commit 2acd684

Browse files
committed
Update the docs
1 parent fab150b commit 2acd684

File tree

3 files changed

+51
-17
lines changed

3 files changed

+51
-17
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@
5454
<br />
5555
</p>
5656

57+
<p>SeleniumBase is the professional toolkit for web automation activities. Built for testing websites, bypassing CAPTCHAs, enhancing productivity, completing tasks, and scaling your business.</p>
58+
5759
--------
5860

5961
📚 Learn from [**over 200 examples** in the **SeleniumBase/examples/** folder](https://github.com/seleniumbase/SeleniumBase/tree/master/examples).
6062

6163
👤 Note that <span translate="no">SeleniumBase</span> <a translate="no" href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/uc_mode.md"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.
6264

63-
ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover & collect tests automatically).
65+
ℹ️ Scripts can be called via <code translate="no"><b>python</b></code>, although some <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">Syntax Formats</a> expect <a href="https://docs.pytest.org/en/latest/how-to/usage.html" translate="no"><b>pytest</b></a> (a Python unit-testing framework included with SeleniumBase that can discover, collect, and run tests automatically).
6466

6567
<p align="left">📗 Here's <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
6668

help_docs/thank_you.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,36 @@
11
<!-- SeleniumBase Docs -->
22

3-
[<img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="290">](https://github.com/seleniumbase/SeleniumBase/blob/master/README.md)
3+
<a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/cdn/img/super_logo_sb.png" title="SeleniumBase" width="290" /></a>
44

5-
### Thank you for flying with SeleniumBase! 🦅
5+
6+
<h3>🛬🛫 Thank you for flying with SeleniumBase! 🦅🚀</h3>
67

78
--------
89

9-
<p><div><b>SeleniumBase Playlist on YouTube:</b></div></p>
10+
<p><div><b>🛩️ SeleniumBase Playlist on YouTube:</b></div></p>
11+
12+
<p><span><a href="https://www.youtube.com/playlist?list=PLp9uKicxkBc5UIlGi2BuE3aWC7JyXpD3m"><img src="https://seleniumbase.github.io/cdn/img/youtube.png" title="SeleniumBase Playlist on YouTube" alt="SeleniumBase Playlist on YouTube" width="76" /></a></span></p>
1013

11-
<p><span><a href="https://www.youtube.com/playlist?list=PLp9uKicxkBc5UIlGi2BuE3aWC7JyXpD3m"><img src="https://seleniumbase.github.io/cdn/img/youtube.png" title="SeleniumBase Playlist on YouTube" alt="SeleniumBase Playlist on YouTube" width="64" /></a></span></p>
14+
<p><div><b>🛩️ SeleniumBase GitHub Home Page:</b></div></p>
1215

13-
<p><div><b>SeleniumBase GitHub Repo Link:</b></div></p>
16+
<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="74" /></a></span></div></p>
1417

15-
<p><div><span><a href="https://github.com/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_github.svg" title="SeleniumBase on GitHub" alt="SeleniumBase on GitHub" width="54" /></a></span></div></p>
18+
<p><div><b>🛩️ SeleniumBase Discord Channel:</b></div></p>
1619

17-
<p><div><b>SeleniumBase Gitter Chat Link:</b></div></p>
20+
<p><span><a href="https://discord.gg/EdhQTn3EyE"><img src="https://seleniumbase.github.io/other/discord_icon.png" title="SeleniumBase on Discord" alt="SeleniumBase on Discord" width="72" /></a></span></p>
1821

19-
<p><span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="42" /></a></span></p>
22+
<p><div><b>🛩️ SeleniumBase Gitter Chat:</b></div></p>
23+
24+
<p><span><a href="https://gitter.im/seleniumbase/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_gitter.svg" title="SeleniumBase on Gitter" alt="SeleniumBase on Gitter" width="56" /></a></span></p>
2025

2126
<p><div><b>Other Social Media Links:</b></div></p>
2227

23-
</div></p>
24-
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="46" /></a></span>
25-
<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" width="46" /></a></span>
26-
<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" width="40" /></a></span>
28+
<div></p>
29+
<span><a href="https://www.facebook.com/SeleniumBase"><img src="https://seleniumbase.github.io/img/social/share_facebook.svg" title="SeleniumBase on Facebook" alt="SeleniumBase on Facebook" width="50" /></a></span>
30+
<span><a href="https://twitter.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_twitter.svg" title="SeleniumBase on Twitter" alt="SeleniumBase on Twitter" width="50" /></a></span>
31+
<span><a href="https://instagram.com/seleniumbase"><img src="https://seleniumbase.github.io/img/social/share_instagram.svg" title="SeleniumBase on Instagram" alt="SeleniumBase on Instagram" width="42" /></a></span>
2732
</div></p>
2833

2934
--------
3035

31-
<p><div><a align="center" href="https://github.com/seleniumbase/SeleniumBase/"><img align="center" src="https://seleniumbase.github.io/img/sb_logo_10.png" alt="SeleniumBase" width="260"></a></div></p>
36+
<p><div><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/img/sb_logo_10.png" alt="SeleniumBase" width="260"></a></div></p>

help_docs/uc_mode.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ with SB(uc=True, test=True, incognito=True, locale_code="en") as sb:
9999
url = "https://ahrefs.com/website-authority-checker"
100100
input_field = 'input[placeholder="Enter domain"]'
101101
submit_button = 'span:contains("Check Authority")'
102-
sb.uc_open_with_reconnect(url, 2) # The bot-check is later
102+
sb.uc_open_with_reconnect(url) # The bot-check is later
103103
sb.type(input_field, "github.com/seleniumbase/SeleniumBase")
104104
sb.reconnect(0.1)
105105
sb.uc_click(submit_button, reconnect_time=4)
106106
sb.uc_gui_click_captcha()
107-
sb.wait_for_text_not_visible("Checking", timeout=10)
107+
sb.wait_for_text_not_visible("Checking", timeout=12)
108108
sb.highlight('p:contains("github.com/seleniumbase/SeleniumBase")')
109109
sb.highlight('a:contains("Top 100 backlinks")')
110110
sb.set_messenger_theme(location="bottom_center")
@@ -158,10 +158,29 @@ The 2nd `print()` should output "Virtual Manager", which means that the automati
158158
* [SeleniumBase/examples/verify_undetected.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/verify_undetected.py)
159159
* [SeleniumBase/examples/raw_bing_captcha.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_bing_captcha.py)
160160
* [SeleniumBase/examples/raw_uc_mode.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_uc_mode.py)
161+
* [SeleniumBase/examples/raw_cf.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_cf.py)
162+
163+
--------
164+
165+
👤 Here's an example where **`incognito=True` is needed for bypassing detection**:
166+
161167
* [SeleniumBase/examples/raw_pixelscan.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_pixelscan.py)
162168

169+
```python
170+
from seleniumbase import SB
171+
172+
with SB(uc=True, incognito=True, test=True) as sb:
173+
sb.driver.uc_open_with_reconnect("https://pixelscan.net/", 10)
174+
sb.remove_elements("jdiv") # Remove chat widgets
175+
sb.highlight("span.text-success", loops=8)
176+
sb.highlight(".bot-detection-context", loops=10, scroll=False)
177+
sb.sleep(2)
178+
```
179+
163180
<img src="https://seleniumbase.github.io/other/pixelscan.jpg" title="SeleniumBase" width="540">
164181

182+
--------
183+
165184
### 👤 Here are some UC Mode examples that bypass CAPTCHAs when clicking is required:
166185
* [SeleniumBase/examples/raw_pyautogui.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_pyautogui.py)
167186
* [SeleniumBase/examples/raw_turnstile.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/raw_turnstile.py)
@@ -170,6 +189,8 @@ The 2nd `print()` should output "Virtual Manager", which means that the automati
170189

171190
<img src="https://seleniumbase.github.io/other/cf_bypass.png" title="SeleniumBase" width="260">
172191

192+
--------
193+
173194
### 👤 Here are the <b><code translate="no">driver</code></b>-specific methods added by SeleniumBase for UC Mode: `--uc` / <b><code translate="no">uc=True</code></b>
174195

175196
```python
@@ -240,6 +261,8 @@ driver.reconnect("breakpoint")
240261

241262
(Note that while the special <b><code translate="no">UC Mode</code></b> breakpoint is active, you can't use <b><code translate="no">Selenium</code></b> commands in the browser, and the browser can't detect <b><code translate="no">Selenium</code></b>.)
242263

264+
--------
265+
243266
👤 On Linux, you may need to use `uc_gui_click_captcha()` to successfully bypass a Cloudflare CAPTCHA. If there's more than one Cloudflare iframe on that website, then put the CSS Selector of an element that's above the iframe as the first arg to `uc_gui_click_captcha()`. This method uses `pyautogui`. In order for `pyautogui` to focus on the correct element, use `xvfb=True` / `--xvfb` to activate a special virtual display on Linux.
244267

245268
👤 `uc_gui_click_captcha()` auto-detects the CAPTCHA type before trying to click it. This is a generic method for both CF Turnstile and Google reCAPTCHA. It will use the code from `uc_gui_click_cf()` and `uc_gui_click_rc()` as needed.
@@ -248,6 +271,8 @@ driver.reconnect("breakpoint")
248271

249272
👤 `uc_gui_click_rc(frame="iframe", retry=False, blind=False)` is for reCAPTCHA. This may only work a few times before not working anymore... not because Selenium was detected, but because reCAPTCHA uses advanced AI to detect unusual activity, unlike the CF Turnstile, which only uses basic detection.
250273

274+
--------
275+
251276
👤 To find out if <b translate="no">UC Mode</b> will work at all on a specific site (before adjusting for timing), load your site with the following script:
252277

253278
```python
@@ -259,6 +284,8 @@ with SB(uc=True) as sb:
259284

260285
(If you remain undetected while loading the page and performing manual actions, then you know you can create a working script once you swap the breakpoint with a time and add special methods like <b><code translate="no">sb.uc_click</code></b> as needed.)
261286

287+
--------
288+
262289
👤 <b>Multithreaded UC Mode:</b>
263290

264291
If you're using <b><code translate="no">pytest</code></b> for multithreaded <b translate="no">UC Mode</b> (which requires using one of the <b><code translate="no">pytest</code></b> [syntax formats](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md)), then all you have to do is set the number of threads when your script runs. (`-n NUM`) Eg:
@@ -343,7 +370,7 @@ The above JS method is used within the <b><code translate="no">SeleniumBase</cod
343370

344371
<img src="https://seleniumbase.github.io/other/me_se_conf.jpg" title="SeleniumBase" width="370">
345372

346-
As an ethical hacker / cybersecurity researcher who builds bots that bypass CAPTCHAs for sport, <b>the CAPTCHA service that I personally recommend</b> for keeping bots out is <b translate="no">Google's reCAPTCHA</b>:
373+
As an ethical hacker / cybersecurity researcher who builds bots that bypass CAPTCHAs for sport, <b>the CAPTCHA service that I personally recommend</b> for keeping bots out is <b translate="no">Google reCAPTCHA</b>:
347374

348375
<img src="https://seleniumbase.github.io/other/g_recaptcha.png" title="SeleniumBase" width="315">
349376

0 commit comments

Comments
 (0)