File tree Expand file tree Collapse file tree 8 files changed +46
-16
lines changed Expand file tree Collapse file tree 8 files changed +46
-16
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ def test_demo_page(self):
34
34
try :
35
35
self .hover_and_click ("#myDropdown" , "#dropOption2" , timeout = 1 )
36
36
except Exception :
37
- # Someone moved the mouse while the test ran
38
- self .js_click ( "#dropOption2" )
37
+ # Someone probably moved the mouse while the test ran
38
+ self .hover_and_js_click ( "#myDropdown" , "#dropOption2" )
39
39
self .assert_text ("Link Two Selected" , "h3" )
40
40
41
41
# Click a button and then verify the expected results
Original file line number Diff line number Diff line change 3
3
4
4
def open_the_form_turnstile_page (sb ):
5
5
sb .driver .uc_open_with_reconnect (
6
- "https://seleniumbase.io/apps/form_turnstile" , reconnect_time = 2.5 ,
6
+ "https://seleniumbase.io/apps/form_turnstile" , reconnect_time = 2.7 ,
7
7
)
8
8
9
9
10
10
def click_turnstile_and_verify (sb ):
11
+ sb .scroll_to_bottom ()
11
12
sb .driver .uc_switch_to_frame ("iframe" )
12
13
sb .driver .uc_click ("span.mark" )
13
14
sb .highlight ("img#captcha-success" , timeout = 3.33 )
Original file line number Diff line number Diff line change
1
+ from seleniumbase import SB
2
+
3
+ with SB (uc = True , test = True ) as sb :
4
+ sb .driver .uc_open_with_reconnect ("https://nopecha.com/demo/turnstile" , 5 )
5
+ sb .driver .uc_switch_to_frame ("#example-container5 iframe" )
6
+ sb .driver .uc_click ("span.mark" )
7
+
8
+ if sb .is_element_visible ("#example-container0 iframe" ):
9
+ sb .switch_to_frame ("#example-container0 iframe" )
10
+ if not sb .is_element_visible ("circle.success-circle" ):
11
+ sb .driver .uc_click ("span.mark" )
12
+ sb .switch_to_frame ("#example-container0 iframe" )
13
+ sb .assert_element ("circle.success-circle" )
14
+ sb .switch_to_parent_frame ()
15
+ sb .switch_to_frame ("#example-container5 iframe" )
16
+ sb .assert_element ("svg#success-icon" , timeout = 3 )
17
+ sb .switch_to_parent_frame ()
18
+ sb .set_messenger_theme (location = "top_center" )
19
+ sb .post_message ("Selenium wasn't detected!" , duration = 3 )
Original file line number Diff line number Diff line change
1
+ from seleniumbase import SB
2
+
3
+ with SB (uc = True , incognito = True , test = True ) as sb :
4
+ sb .driver .uc_open_with_reconnect ("https://pixelscan.net/" , 11 )
5
+ sb .remove_elements ("jdiv" ) # Remove chat widgets
6
+ sb .assert_text ("No automation framework detected" , "pxlscn-bot-detection" )
7
+ sb .assert_text ("You are not masking your fingerprint" )
8
+ sb .highlight ("span.text-success" , loops = 10 )
9
+ sb .sleep (1 )
10
+ sb .highlight ("pxlscn-fingerprint-masking div" , loops = 10 , scroll = False )
11
+ sb .sleep (1 )
12
+ sb .highlight ("div.bot-detection-context" , loops = 10 , scroll = False )
13
+ sb .sleep (3 )
Original file line number Diff line number Diff line change 3
3
4
4
def open_the_turnstile_page (sb ):
5
5
sb .driver .uc_open_with_reconnect (
6
- "https://seleniumbase.io/apps/turnstile" , reconnect_time = 2.5 ,
6
+ "https://seleniumbase.io/apps/turnstile" , reconnect_time = 2.7 ,
7
7
)
8
8
9
9
Original file line number Diff line number Diff line change 2
2
from seleniumbase import SB
3
3
4
4
with SB (uc = True , test = True ) as sb :
5
- sb .driver .uc_open_with_reconnect ("https://top.gg/" , 4 )
5
+ sb .driver .uc_open_with_reconnect ("https://top.gg/" , 5 )
6
6
if not sb .is_text_visible ("Discord Bots" , "h1" ):
7
- sb .get_new_driver (undetectable = True )
8
7
sb .driver .uc_open_with_reconnect ("https://top.gg/" , 5 )
9
- sb .activate_demo_mode () # Highlight + show assertions
10
8
sb .assert_text ("Discord Bots" , "h1" , timeout = 3 )
9
+ sb .highlight ("h1" , loops = 3 )
10
+ sb .set_messenger_theme (location = "top_center" )
11
+ sb .post_message ("Selenium wasn't detected!" , duration = 3 )
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ def test_demo_site(self):
29
29
try :
30
30
self .hover_and_click ("#myDropdown" , "#dropOption2" , timeout = 1 )
31
31
except Exception :
32
- # Someone moved the mouse while the test ran
33
- self .js_click ( "#dropOption2" )
32
+ # Someone probably moved the mouse while the test ran
33
+ self .hover_and_js_click ( "#myDropdown" , "#dropOption2" )
34
34
self .assert_text ("Link Two Selected" , "h3" )
35
35
36
36
# Click a button and then verify the expected results
Original file line number Diff line number Diff line change @@ -9,15 +9,11 @@ class UndetectedTest(BaseCase):
9
9
def test_browser_is_undetected (self ):
10
10
if not self .undetectable :
11
11
self .get_new_driver (undetectable = True )
12
- self .driver .uc_open_with_reconnect (
13
- "https://top.gg/" , reconnect_time = 4
14
- )
12
+ self .driver .uc_open_with_reconnect ("https://top.gg/" , 5 )
15
13
if not self .is_text_visible ("Discord Bots" , "h1" ):
16
14
self .get_new_driver (undetectable = True )
17
- self .driver .uc_open_with_reconnect (
18
- "https://top.gg/" , reconnect_time = 5
19
- )
15
+ self .driver .uc_open_with_reconnect ("https://top.gg/" , 5 )
20
16
self .assert_text ("Discord Bots" , "h1" , timeout = 3 )
21
- self .set_messenger_theme (theme = "air" , location = "top_center" )
17
+ self .set_messenger_theme (location = "top_center" )
22
18
self .post_message ("Selenium wasn't detected!" , duration = 2.8 )
23
19
self ._print ("\n Success! Website did not detect Selenium! " )
You can’t perform that action at this time.
0 commit comments