@@ -835,6 +835,16 @@ def _uc_gui_click_captcha(
835
835
'[data-callback="onCaptchaSuccess"]'
836
836
):
837
837
frame = '[data-callback="onCaptchaSuccess"]'
838
+ elif (
839
+ (
840
+ driver .is_element_present ('[name*="cf-turnstile-"]' )
841
+ or driver .is_element_present ('[id*="cf-turnstile-"]' )
842
+ )
843
+ and driver .is_element_present (
844
+ 'div > div > [style*="margin"][style*="padding"]'
845
+ )
846
+ ):
847
+ frame = 'div > div > [style*="margin"][style*="padding"]'
838
848
else :
839
849
return
840
850
if driver .is_element_present ('form[class*=center]' ):
@@ -1007,6 +1017,26 @@ def uc_gui_handle_cf(driver, frame="iframe"):
1007
1017
and driver .is_element_present ("div.spacer div[style]" )
1008
1018
):
1009
1019
frame = "div.spacer div[style]"
1020
+ elif (
1021
+ (
1022
+ driver .is_element_present ('[name*="cf-turnstile-"]' )
1023
+ or driver .is_element_present ('[id*="cf-turnstile-"]' )
1024
+ )
1025
+ and driver .is_element_present (
1026
+ 'form div div[style*="margin"][style*="padding"]'
1027
+ )
1028
+ ):
1029
+ frame = 'form div div[style*="margin"][style*="padding"]'
1030
+ elif (
1031
+ (
1032
+ driver .is_element_present ('[name*="cf-turnstile-"]' )
1033
+ or driver .is_element_present ('[id*="cf-turnstile-"]' )
1034
+ )
1035
+ and driver .is_element_present (
1036
+ 'div > div > [style*="margin"][style*="padding"]'
1037
+ )
1038
+ ):
1039
+ frame = 'div > div > [style*="margin"][style*="padding"]'
1010
1040
else :
1011
1041
return
1012
1042
if not is_in_frame or needs_switch :
@@ -1028,7 +1058,7 @@ def uc_gui_handle_cf(driver, frame="iframe"):
1028
1058
active_element_css = js_utils .get_active_element_css (driver )
1029
1059
if (
1030
1060
active_element_css .startswith ("div.cf-turnstile" )
1031
- or active_element_css .startswith ( " div#PYMIw2" )
1061
+ or active_element_css .endswith ( " > div" * 2 )
1032
1062
):
1033
1063
found_checkbox = True
1034
1064
break
0 commit comments