@@ -1377,9 +1377,9 @@ def _uc_gui_click_captcha(
13771377 ):
13781378 frame = '[data-testid*="challenge-"] div'
13791379 elif driver .is_element_present (
1380- "form.turnstile div#turnstile-widget div:not([class])"
1380+ "div#turnstile-widget div:not([class])"
13811381 ):
1382- frame = "form.turnstile #turnstile-widget div:not([class])"
1382+ frame = "div #turnstile-widget div:not([class])"
13831383 elif driver .is_element_present (
13841384 'form div:not([class]):has(input[name*="cf-turn"])'
13851385 ):
@@ -1667,7 +1667,6 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
16671667 driver .set_window_rect (win_x , win_y , width , height )
16681668 time .sleep (0.33 )
16691669 tab_up_first = False
1670- special_form = False
16711670 if ctype == "cf_t" :
16721671 if (
16731672 driver .is_element_present (".cf-turnstile-wrapper iframe" )
@@ -1701,7 +1700,6 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
17011700 ):
17021701 frame = 'form div:not([class]):has(input[name*="cf-turn"])'
17031702 tab_up_first = True
1704- special_form = True
17051703 elif (
17061704 driver .is_element_present ('[src*="/turnstile/"]' )
17071705 and driver .is_element_present ("form div:not(:has(*))" )
@@ -1715,6 +1713,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
17151713 )
17161714 ):
17171715 frame = "body > div#check > div:not([class])"
1716+ elif driver .is_element_present (
1717+ "div#turnstile-widget div:not([class])"
1718+ ):
1719+ frame = "div#turnstile-widget div:not([class])"
17181720 elif driver .is_element_present (".cf-turnstile-wrapper" ):
17191721 frame = ".cf-turnstile-wrapper"
17201722 elif driver .is_element_present ('[class="cf-turnstile"]' ):
@@ -1759,8 +1761,7 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
17591761 active_element_css = js_utils .get_active_element_css (driver )
17601762 if (
17611763 active_element_css .startswith (selector )
1762- or active_element_css .endswith (" > div" * 2 )
1763- or (special_form and active_element_css .endswith (" div" ))
1764+ or active_element_css .endswith (" div" )
17641765 or (ctype == "g_rc" and "frame[name" in active_element_css )
17651766 ):
17661767 found_checkbox = True
0 commit comments