i am trying to automate recaptcha in python selenium webdriver using capmonster api for python but it seems to recieve and send response but not clicking the recaptcha because money is being deducted
here is my code:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
#from capmonster_python import NoCaptchaTaskProxyless
from capmonster_python import RecaptchaV2Task
options = Options()
options.add_argument("--lang=en")
browser=webdriver.Chrome(options=options,executable_path=r"C:\Users\irfan\Downloads\chromedriver.exe")
browser.get("https://www.google.com/recaptcha/api2/demo")
website_key="6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-"
website_url=browser.current_url
captcha=RecaptchaV2Task(client_key="Key")
taskId=captcha.create_task(website_url,website_key)
print("Task Created")
response=captcha.join_task_result(taskId)
print("Response Recieved")
browser.execute_script(f"document.getElementsByClassName('g-recaptcha-response')[0].innerHTML = '{response}';")
print("response injected to input")
browser.find_element_by_id("recaptcha-demo-submit").click()
print("#Form Submitted")
Welcome to the Atlassian Community!
What does this have to do with Confluence?
Assuming your code is trying to log into Confluence, why is it trying to do captcha work? That only happens when you've failed to log in too many times, at which point, you should not be trying to automate any log in. Even assuming there's a good reason to do this in code, what do you mean by "because money is being deducted"?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.