Skip to content

Commit 9361c1c

Browse files
committed
Update examples
1 parent 7f9dba8 commit 9361c1c

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

examples/raw_ahrefs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from seleniumbase import SB
22

3-
43
with SB(uc=True, test=True, locale_code="en") as sb:
54
url = "https://ahrefs.com/website-authority-checker"
65
input_field = 'input[placeholder="Enter domain"]'

examples/raw_form_turnstile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from seleniumbase import SB
22

33
with SB(uc=True, test=True) as sb:
4-
sb.driver.uc_open_with_reconnect("seleniumbase.io/apps/form_turnstile", 3)
4+
url = "seleniumbase.io/apps/form_turnstile"
5+
sb.driver.uc_open_with_reconnect(url, 2)
56
sb.press_keys("#name", "SeleniumBase")
67
sb.press_keys("#email", "test@test.test")
78
sb.press_keys("#phone", "1-555-555-5555")

examples/raw_nopecha.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from seleniumbase import SB
22

33
with SB(uc=True, test=True) as sb:
4-
sb.driver.uc_open_with_reconnect("nopecha.com/demo/turnstile", 3.4)
4+
sb.driver.uc_open_with_reconnect("nopecha.com/demo/turnstile", 4)
55
if sb.is_element_visible("#example-container0 iframe"):
66
sb.switch_to_frame("#example-container0 iframe")
77
if not sb.is_element_visible("circle.success-circle"):

examples/raw_order_tickets.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from seleniumbase import SB
2+
3+
with SB(uc=True, test=True, ad_block_on=True) as sb:
4+
url = "https://www.thaiticketmajor.com/concert/"
5+
sb.driver.uc_open_with_reconnect(url, 5.5)
6+
sb.driver.uc_click("button.btn-signin", 4)
7+
sb.switch_to_frame('iframe[title*="Cloudflare"]')
8+
sb.assert_element("div#success svg#success-icon")
9+
sb.switch_to_default_content()
10+
sb.set_messenger_theme(location="top_center")
11+
sb.post_message("SeleniumBase wasn't detected!")

examples/raw_turnstile.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33

44
def open_the_turnstile_page(sb):
5-
sb.driver.uc_open_with_reconnect(
6-
"seleniumbase.io/apps/turnstile", reconnect_time=3,
7-
)
5+
url = "seleniumbase.io/apps/turnstile"
6+
sb.driver.uc_open_with_reconnect(url, reconnect_time=2)
87

98

109
def click_turnstile_and_verify(sb):

0 commit comments

Comments
 (0)