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
<spanclass="n">sb</span><spanclass="o">.</span><spanclass="n">uc_open_with_reconnect</span><spanclass="p">(</span><spanclass="n">url</span><spanclass="p">,</span><spanclass="mi">2</span><spanclass="p">)</span><spanclass="c1"># The bot-check is later</span>
2718
+
<spanclass="n">sb</span><spanclass="o">.</span><spanclass="n">uc_open_with_reconnect</span><spanclass="p">(</span><spanclass="n">url</span><spanclass="p">)</span><spanclass="c1"># The bot-check is later</span>
<h3id="here-are-some-uc-mode-examples-that-bypass-captchas-when-clicking-is-required">👤 Here are some UC Mode examples that bypass CAPTCHAs when clicking is required<aclass="headerlink" href="#here-are-some-uc-mode-examples-that-bypass-captchas-when-clicking-is-required" title="Permanent link">¶</a></h3>
<h3id="here-are-the-driver-specific-methods-added-by-seleniumbase-for-uc-mode-uc-uctrue">👤 Here are the <b><codetranslate="no">driver</code></b>-specific methods added by SeleniumBase for UC Mode: <code>--uc</code> / <b><codetranslate="no">uc=True</code></b><aclass="headerlink" href="#here-are-the-driver-specific-methods-added-by-seleniumbase-for-uc-mode-uc-uctrue" title="Permanent link">¶</a></h3>
<p>(Note that while the special <b><codetranslate="no">UC Mode</code></b> breakpoint is active, you can't use <b><codetranslate="no">Selenium</code></b> commands in the browser, and the browser can't detect <b><codetranslate="no">Selenium</code></b>.)</p>
2847
+
<hr/>
2831
2848
<p>👤 On Linux, you may need to use <code>uc_gui_click_captcha()</code> 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 <code>uc_gui_click_captcha()</code>. This method uses <code>pyautogui</code>. In order for <code>pyautogui</code> to focus on the correct element, use <code>xvfb=True</code> / <code>--xvfb</code> to activate a special virtual display on Linux.</p>
2832
2849
<p>👤 <code>uc_gui_click_captcha()</code> 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 <code>uc_gui_click_cf()</code> and <code>uc_gui_click_rc()</code> as needed.</p>
2833
2850
<p>👤 <code>uc_gui_click_cf(frame="iframe", retry=False, blind=False)</code> has three args. (All optional). The first one, <code>frame</code>, lets you specify the selector above the iframe in case the CAPTCHA is not located in the first iframe on the page. The second one, <code>retry</code>, lets you retry the click after reloading the page if the first one didn't work (and a CAPTCHA is still present after the page reload). The third arg, <code>blind</code>, (if <code>True</code>), will retry after a page reload (if the first click failed) by clicking at the last known coordinates of the CAPTCHA checkbox without confirming first with Selenium that a CAPTCHA is still on the page.</p>
2834
2851
<p>👤 <code>uc_gui_click_rc(frame="iframe", retry=False, blind=False)</code> 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.</p>
2852
+
<hr/>
2835
2853
<p>👤 To find out if <btranslate="no">UC Mode</b> will work at all on a specific site (before adjusting for timing), load your site with the following script:</p>
<p>(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><codetranslate="no">sb.uc_click</code></b> as needed.)</p>
2860
+
<hr/>
2842
2861
<p>👤 <b>Multithreaded UC Mode:</b></p>
2843
2862
<p>If you're using <b><codetranslate="no">pytest</code></b> for multithreaded <btranslate="no">UC Mode</b> (which requires using one of the <b><codetranslate="no">pytest</code></b><ahref="../syntax_formats/">syntax formats</a>), then all you have to do is set the number of threads when your script runs. (<code>-n NUM</code>) Eg:</p>
<p>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 <btranslate="no">Google's reCAPTCHA</b>:</p>
2920
+
<p>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 <btranslate="no">Google reCAPTCHA</b>:</p>
<p>Since Google makes Chrome, Google's own <btranslate="no">reCAPTCHA</b> service has access to more data than other CAPTCHA services (eg. hCaptcha, CloudFlare, DataDome, etc.), and can therefore use that data to make better decisions about whether or not web activity is coming from real humans or automated bots.</p>
Copy file name to clipboardExpand all lines: index.html
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2563,10 +2563,12 @@ <h1>SeleniumBase</h1>
2563
2563
<br/>
2564
2564
</p>
2565
2565
2566
+
<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>
2567
+
2566
2568
<hr/>
2567
2569
<p>📚 Learn from <ahref="https://github.com/seleniumbase/SeleniumBase/tree/master/examples"><strong>over 200 examples</strong> in the <strong>SeleniumBase/examples/</strong> folder</a>.</p>
2568
2570
<p>👤 Note that <spantranslate="no">SeleniumBase</span><atranslate="no" href="help_docs/uc_mode/"><b>UC Mode</b> (Stealth Mode) has its own ReadMe</a>.</p>
2569
-
<p>ℹ️ Scripts can be called via <codetranslate="no"><b>python</b></code>, although some <ahref="help_docs/syntax_formats/">Syntax Formats</a> expect <ahref="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).</p>
2571
+
<p>ℹ️ Scripts can be called via <codetranslate="no"><b>python</b></code>, although some <ahref="help_docs/syntax_formats/">Syntax Formats</a> expect <ahref="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).</p>
2570
2572
<palign="left">📗 Here's <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py">my_first_test.py</a>, which tests login, shopping, and checkout:</p>
0 commit comments