Skip to content

Commit d10164c

Browse files
committed
Handle update to form turnstiles
1 parent 645b126 commit d10164c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

seleniumbase/core/browser_launcher.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,16 @@ def _uc_gui_click_captcha(
812812
and driver.is_element_present("div.spacer div[style]")
813813
):
814814
frame = "div.spacer div[style]"
815+
elif (
816+
(
817+
driver.is_element_present('[name*="cf-turnstile-"]')
818+
or driver.is_element_present('[id*="cf-turnstile-"]')
819+
)
820+
and driver.is_element_present(
821+
'form div div[style*="margin"][style*="padding"]'
822+
)
823+
):
824+
frame = 'form div div[style*="margin"][style*="padding"]'
815825
elif (
816826
frame != "iframe"
817827
and driver.is_element_present(
@@ -1017,7 +1027,7 @@ def uc_gui_handle_cf(driver, frame="iframe"):
10171027
time.sleep(0.02)
10181028
active_element_css = js_utils.get_active_element_css(driver)
10191029
if (
1020-
active_element_css == "div.cf-turnstile-wrapper"
1030+
active_element_css.startswith("div.cf-turnstile")
10211031
or active_element_css.startswith("div#PYMIw2")
10221032
):
10231033
found_checkbox = True

0 commit comments

Comments
 (0)