@@ -1377,9 +1377,9 @@ def _uc_gui_click_captcha(
1377
1377
):
1378
1378
frame = '[data-testid*="challenge-"] div'
1379
1379
elif driver .is_element_present (
1380
- "form.turnstile div#turnstile-widget div:not([class])"
1380
+ "div#turnstile-widget div:not([class])"
1381
1381
):
1382
- frame = "form.turnstile #turnstile-widget div:not([class])"
1382
+ frame = "div #turnstile-widget div:not([class])"
1383
1383
elif driver .is_element_present (
1384
1384
'form div:not([class]):has(input[name*="cf-turn"])'
1385
1385
):
@@ -1667,7 +1667,6 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
1667
1667
driver .set_window_rect (win_x , win_y , width , height )
1668
1668
time .sleep (0.33 )
1669
1669
tab_up_first = False
1670
- special_form = False
1671
1670
if ctype == "cf_t" :
1672
1671
if (
1673
1672
driver .is_element_present (".cf-turnstile-wrapper iframe" )
@@ -1701,7 +1700,6 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
1701
1700
):
1702
1701
frame = 'form div:not([class]):has(input[name*="cf-turn"])'
1703
1702
tab_up_first = True
1704
- special_form = True
1705
1703
elif (
1706
1704
driver .is_element_present ('[src*="/turnstile/"]' )
1707
1705
and driver .is_element_present ("form div:not(:has(*))" )
@@ -1715,6 +1713,10 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
1715
1713
)
1716
1714
):
1717
1715
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])"
1718
1720
elif driver .is_element_present (".cf-turnstile-wrapper" ):
1719
1721
frame = ".cf-turnstile-wrapper"
1720
1722
elif driver .is_element_present ('[class="cf-turnstile"]' ):
@@ -1759,8 +1761,7 @@ def _uc_gui_handle_captcha_(driver, frame="iframe", ctype=None):
1759
1761
active_element_css = js_utils .get_active_element_css (driver )
1760
1762
if (
1761
1763
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" )
1764
1765
or (ctype == "g_rc" and "frame[name" in active_element_css )
1765
1766
):
1766
1767
found_checkbox = True
0 commit comments