add js click on iframe_body

This commit is contained in:
MCG-pok 2024-07-19 02:25:29 +02:00
parent 05bb7d4c9d
commit f5b3ad96fd

View File

@ -288,11 +288,12 @@ def click_verify(driver: WebDriver):
return document.querySelector('body'); return document.querySelector('body');
""") """)
if iframe_body: if iframe_body:
iframe_body.click()
actions = ActionChains(driver) actions = ActionChains(driver)
actions.move_to_element_with_offset(iframe_body, 10, 10) actions.move_to_element_with_offset(iframe_body, 10, 10)
actions.click(iframe_body) actions.click(iframe_body)
actions.perform() actions.perform()
logging.debug("Cloudflare verify checkbox found and clicked!") logging.debug("Attempted to click on iframe body")
except Exception as e: except Exception as e:
logging.debug("Cloudflare verify checkbox not found on the page. %s", repr(e)) logging.debug("Cloudflare verify checkbox not found on the page. %s", repr(e))
finally: finally: