File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -60,13 +60,13 @@ from seleniumbase import SB
6060
6161def open_the_turnstile_page (sb ):
6262 sb.driver.uc_open_with_reconnect(
63- " https://seleniumbase.io/apps/turnstile" , reconnect_time = 2.5 ,
63+ " https://seleniumbase.io/apps/turnstile" , reconnect_time = 3 ,
6464 )
6565
6666def click_turnstile_and_verify (sb ):
67- sb.driver.uc_switch_to_frame (" iframe" )
67+ sb.switch_to_frame (" iframe" )
6868 sb.driver.uc_click(" span.mark" )
69- sb.assert_element(" img#captcha-success" , timeout = 3.33 )
69+ sb.assert_element(" img#captcha-success" , timeout = 3 )
7070
7171with SB(uc = True , test = True ) as sb:
7272 open_the_turnstile_page(sb)
@@ -99,6 +99,10 @@ driver.uc_open_with_reconnect(url, reconnect_time=None)
9999
100100driver.reconnect(timeout)
101101
102+ driver.disconnect()
103+
104+ driver.connect()
105+
102106driver.uc_click(
103107 selector, by = " css selector" ,
104108 timeout = settings.SMALL_TIMEOUT , reconnect_time = None )
You can’t perform that action at this time.
0 commit comments