Scripts sometimes clicks the verification button, but mostly not with sb.uc_gui_handle_cf #2915
-
Hey, so I'm trying to bypass Cloudflare verification and CLICK the button to verify with the scripts below, and I do not understand why most of the time, even when the Chrome page is on top, it does not even detect the button and it does not click on it. I cannot understand why it's so random and what I am doing wrong. I tried it on a different script (which is below as well), but yet again, sometimes it detects it and prints logging.info("CAPTCHA iframe found"), and most of the time it prints logging.info("No CAPTCHA iframe found, assuming automatic verification"), but we are on the CAPTCHA page. Both scripts WORK and click the button Id say 40% of the time AND I do not understand why its not 100%. Both scripts:
script 2:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
It's probably timing-related. from seleniumbase import SB
with SB(uc=True, test=True) as sb:
url = "https://www.virtualmanager.com/en/login"
sb.uc_open_with_reconnect(url, 4)
sb.uc_gui_click_cf()
sb.assert_element('input[name*="email"]')
sb.assert_element('input[name*="login"]')
sb.set_messenger_theme(location="bottom_center")
sb.post_message("SeleniumBase wasn't detected!") |
Beta Was this translation helpful? Give feedback.
It's probably timing-related.
You could try the newer
uc_gui_click_cf()
command in4.28.4
(and newer versions).