diff --git a/examples/presenter/uc_presentation.py b/examples/presenter/uc_presentation.py
index ba6247cd..ae5ff4dc 100644
--- a/examples/presenter/uc_presentation.py
+++ b/examples/presenter/uc_presentation.py
@@ -30,12 +30,12 @@ class UCPresentationClass(BaseCase):
self.get_new_driver(undetectable=True)
url = "https://gitlab.com/users/sign_in"
try:
- self.driver.uc_open_with_reconnect(url, reconnect_time=3)
+ self.uc_open_with_reconnect(url, reconnect_time=3)
try:
self.assert_text("Username", '[for="user_login"]', timeout=3)
self.post_message("SeleniumBase wasn't detected", duration=4)
except Exception:
- self.driver.uc_open_with_reconnect(url, reconnect_time=4)
+ self.uc_open_with_reconnect(url, reconnect_time=4)
self.assert_text("Username", '[for="user_login"]', timeout=3)
self.post_message("SeleniumBase wasn't detected", duration=4)
finally:
@@ -249,8 +249,7 @@ class UCPresentationClass(BaseCase):
code=(
"
uc_gui_handle_captcha()
sb.uc_gui_handle_captcha()
uc_gui_click_captcha()
sb.uc_gui_click_captcha()
sb.uc_open_with_reconnect(url)
"
"uc_gui_handle_captcha()
"
- " or uc_gui_click_captcha()
"
+ "sb.uc_gui_handle_captcha()
"
+ " or sb.uc_gui_click_captcha()
"
" to bypass CAPTCHAs as needed.uc_click(selector)
"
+ "sb.uc_click(selector)
"
"👤
" - '
uc_gui_click_captcha(frame="iframe", retry=False,'
+ 'sb.uc_gui_click_captcha(frame="iframe", retry=False,'
' blind=True )
'
'Set the third arg, `blind`, to `True` to force a retry'
' (if the first click failed) by clicking at the last known'
diff --git a/examples/raw_ahrefs.py b/examples/raw_ahrefs.py
index f09cf78d..55898298 100644
--- a/examples/raw_ahrefs.py
+++ b/examples/raw_ahrefs.py
@@ -4,12 +4,12 @@ with SB(uc=True, test=True, incognito=True, locale_code="en") as sb:
url = "https://ahrefs.com/website-authority-checker"
input_field = 'input[placeholder="Enter domain"]'
submit_button = 'span:contains("Check Authority")'
- sb.uc_open_with_reconnect(url, 2) # The bot-check is later
+ sb.uc_open_with_reconnect(url) # The bot-check is later
sb.type(input_field, "github.com/seleniumbase/SeleniumBase")
sb.reconnect(0.1)
sb.uc_click(submit_button, reconnect_time=4)
sb.uc_gui_click_captcha()
- sb.wait_for_text_not_visible("Checking", timeout=10)
+ sb.wait_for_text_not_visible("Checking", timeout=12)
sb.highlight('p:contains("github.com/seleniumbase/SeleniumBase")')
sb.highlight('a:contains("Top 100 backlinks")')
sb.set_messenger_theme(location="bottom_center")
diff --git a/examples/raw_cf.py b/examples/raw_cf.py
index b8a79149..58df9df8 100644
--- a/examples/raw_cf.py
+++ b/examples/raw_cf.py
@@ -1,14 +1,14 @@
"""SB Manager using UC Mode & PyAutoGUI for bypassing CAPTCHAs."""
from seleniumbase import SB
-with SB(uc=True, test=True) as sb:
+with SB(uc=True, test=True, locale_code="en") as sb:
url = "https://www.cloudflare.com/login"
- sb.uc_open_with_reconnect(url, 5)
+ sb.uc_open_with_reconnect(url, 5.5)
sb.uc_gui_handle_captcha() # PyAutoGUI press Tab and Spacebar
sb.sleep(2.5)
-with SB(uc=True, test=True) as sb:
+with SB(uc=True, test=True, locale_code="en") as sb:
url = "https://www.cloudflare.com/login"
- sb.uc_open_with_reconnect(url, 5)
+ sb.uc_open_with_reconnect(url, 5.5)
sb.uc_gui_click_captcha() # PyAutoGUI click. (Linux needs it)
sb.sleep(2.5)
diff --git a/examples/raw_order_tickets.py b/examples/raw_order_tickets.py
index 58017837..caabfd1c 100644
--- a/examples/raw_order_tickets.py
+++ b/examples/raw_order_tickets.py
@@ -1,7 +1,8 @@
from seleniumbase import SB
with SB(uc=True, test=True, ad_block=True) as sb:
- url = "https://www.thaiticketmajor.com/concert/"
+ url = "https://www.thaiticketmajor.com/concert/#"
sb.uc_open_with_reconnect(url, 6.111)
sb.uc_click("button.btn-signin", 4.1)
sb.uc_gui_click_captcha()
+ sb.sleep(2)
diff --git a/examples/raw_pixelscan.py b/examples/raw_pixelscan.py
index 1868ddff..03a14001 100644
--- a/examples/raw_pixelscan.py
+++ b/examples/raw_pixelscan.py
@@ -3,12 +3,14 @@ from seleniumbase import SB
with SB(uc=True, incognito=True, test=True) as sb:
sb.driver.uc_open_with_reconnect("https://pixelscan.net/", 10)
sb.remove_elements("jdiv") # Remove chat widgets
- sb.assert_text("No automation framework detected", "pxlscn-bot-detection")
- not_masking = "You are not masking your fingerprint"
- sb.assert_text(not_masking, "pxlscn-fingerprint-masking")
+ no_automation_detected = "No automation framework detected"
+ sb.assert_text(no_automation_detected, "pxlscn-bot-detection")
+ not_masking_text = "You are not masking your fingerprint"
+ sb.assert_text(not_masking_text, "pxlscn-fingerprint-masking")
sb.highlight("span.text-success", loops=8)
sb.sleep(1)
- sb.highlight("pxlscn-fingerprint-masking div", loops=9, scroll=False)
+ fingerprint_masking_div = "pxlscn-fingerprint-masking div"
+ sb.highlight(fingerprint_masking_div, loops=9, scroll=False)
sb.sleep(1)
- sb.highlight("div.bot-detection-context", loops=10, scroll=False)
+ sb.highlight(".bot-detection-context", loops=10, scroll=False)
sb.sleep(2)