SeleniumBase
SeleniumBase copied to clipboard
Cloudflare Form Turnstile Failure
I'm using Driver class to auomate login process on a website and even I'm using the uc mode, it does not seem to work properly. I've also tried with other classes, the result is the same. When the span of the iframe is clicked, it shows Failure. I've also tried manual clicking, it's the same. Here is the code
from seleniumbase import Driver
driver = Driver(uc=True, browser='Chrome')
# Reading the credentials
with open('creds.txt', 'r') as f:
lines = f.read().splitlines()
mail = lines[0].strip()
password = lines[1].strip()
try:
driver.maximize_window()
driver.uc_open_with_reconnect("https://visa.vfsglobal.com/ind/en/pol/login", reconnect_time=20)
driver.find_element("#onetrust-accept-btn-handler").click()
# Typing the credentials
driver.type("#mat-input-0", mail)
driver.type("#mat-input-1", password)
driver.sleep(5)
driver.highlight_click(".mat-button-wrapper")
driver.sleep(5)
driver.switch_to_frame("iframe")
driver.uc_click("span")
Here is the screenshot