Skip to content

Commit 539c09e

Browse files
committed
Update the docs
1 parent e5281a1 commit 539c09e

File tree

2 files changed

+12
-20
lines changed

2 files changed

+12
-20
lines changed

help_docs/method_summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ driver.uc_click(
10191019
selector, by="css selector",
10201020
timeout=settings.SMALL_TIMEOUT, reconnect_time=None)
10211021

1022-
driver.uc_switch_to_frame(frame)
1022+
driver.uc_switch_to_frame(frame, reconnect_time=None)
10231023
```
10241024

10251025
--------

help_docs/uc_mode.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from seleniumbase import Driver
2626

2727
driver = Driver(uc=True)
28-
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", 5)
28+
driver.uc_open_with_reconnect("https://top.gg/", 6)
2929
driver.quit()
3030
```
3131

@@ -35,30 +35,22 @@ driver.quit()
3535
from seleniumbase import SB
3636

3737
with SB(uc=True) as sb:
38-
sb.driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", 5)
38+
sb.driver.uc_open_with_reconnect("https://top.gg/", 6)
3939
```
4040

41-
👤 Here's a longer example, which includes retries and a captcha-click failsafe for bypassing detection:
41+
👤 Here's a longer example, which includes a retry if the CAPTCHA isn't bypassed on the first attempt:
4242

4343
```python
4444
from seleniumbase import SB
4545

4646
with SB(uc=True, test=True) as sb:
47-
sb.driver.uc_open_with_tab("https://nowsecure.nl/#relax")
48-
sb.sleep(1.2)
49-
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
50-
sb.get_new_driver(undetectable=True)
51-
sb.driver.uc_open_with_reconnect(
52-
"https://nowsecure.nl/#relax", reconnect_time=3
53-
)
54-
sb.sleep(1.2)
55-
if not sb.is_text_visible("OH YEAH, you passed!", "h1"):
56-
if sb.is_element_visible('iframe[src*="challenge"]'):
57-
with sb.frame_switch('iframe[src*="challenge"]'):
58-
sb.click("span.mark")
59-
sb.sleep(2)
60-
sb.activate_demo_mode()
61-
sb.assert_text("OH YEAH, you passed!", "h1", timeout=3)
47+
sb.driver.uc_open_with_reconnect("https://top.gg/", 5)
48+
if not sb.is_text_visible("Discord Bots", "h1"):
49+
sb.driver.uc_open_with_reconnect("https://top.gg/", 5)
50+
sb.assert_text("Discord Bots", "h1", timeout=3)
51+
sb.highlight("h1", loops=3)
52+
sb.set_messenger_theme(location="top_center")
53+
sb.post_message("Selenium wasn't detected!", duration=3)
6254
```
6355

6456
👤 Here's an example where clicking the checkbox is required, even for humans: (Commonly seen with forms that are CAPTCHA-protected.)
@@ -111,7 +103,7 @@ driver.uc_click(
111103
selector, by="css selector",
112104
timeout=settings.SMALL_TIMEOUT, reconnect_time=None)
113105

114-
driver.uc_switch_to_frame(frame)
106+
driver.uc_switch_to_frame(frame, reconnect_time=None)
115107
```
116108

117109
(Note that the `reconnect_time` is used to specify how long the driver should be disconnected from Chrome to prevent detection before reconnecting again.)

0 commit comments

Comments
 (0)