question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selenium not submitting form with anticaptcha

See original GitHub issue

@ad-m I really tried hard using your code with selenium and chrome. I want to login on https://services.aig.co.il/PersonalServices/#/login;url=%2Fhome

when I’m trying to login after some attempts there is Recaptcha and I have API_KEY and SITE_KEY. I got a token using website_url and site_key. but still, a successful login is not working.

api_key = "**********************"
client = AnticaptchaClient(api_key)


def get_token(website_url, site_key, invisible):
    task = NoCaptchaTaskProxylessTask(
        website_url=website_url,
        website_key=site_key,
        is_invisible=invisible
    )
    job = client.createTask(task)
    job.join()
    return job.get_solution_response()

I got token succesfull but I don’t know what is not woking when i’m trying to submit form.

 site_key = "6LcJ8QgUAAAAAB_VRlbua73AhNAp7b6AVLw-cORX"
__SITE_HOME_PAGE_FOR_CRAWLING = 'https://services.aig.co.il/PersonalServices/#/login;url=%2Fhome'
 print("Found site-key", site_key)
 invisible_captcha = False
 token = get_token(__SITE_HOME_PAGE_FOR_CRAWLING, site_key, invisible_captcha)
 print("Found token", token)
 print("Received challenge-response")

 # Inject response in webpage
 current_user_driver.execute_script('document.getElementById("g-recaptcha-response").innerHTML = "%s"' % token)

 # submit form
 login_form = WebDriverWait(current_user_driver, 10).until(
            EC.presence_of_element_located((By.CLASS_NAME, "login__form")))
 submit_button = WebDriverWait(login_form, 10).until(
            EC.element_to_be_clickable((By.CLASS_NAME, "login__form__button")))
 submit_button.click()

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ScrimForevercommented, Feb 4, 2020

I have same problem. On site that i trying break captcha, don´t have form , just have same

<textarea id="g-recaptcha-response-1" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid rgb(193, 193, 193); margin: 10px 25px; padding: 0px; resize: none; display: none;"></textarea>

URL

ULR = https://www.nike.com.br/Snkrs/Produto/Air-Max-1-Premium/153-169-211-208971

0reactions
fashan7commented, Aug 23, 2021

problem solved see #92

Read more comments on GitHub >

github_iconTop Results From Across the Web

Submitting reCAPTCHA v2 with selenium and python
NOTE: This CAPTCHA did not have a submit button and was not placed in a form. So using .submit() on an item within...
Read more >
How to use Anti-Captcha plugin in Puppeteer or Selenium
In this article we'll show how to use it in Puppeteer and Selenium for NodeJS and ... Some web forms require user to...
Read more >
Self-verifying reCAPTCHA that has no form submit button ...
So I recently signed up with anti-captcha and have been testing with the… ... that has no form submit button using selenium &...
Read more >
python-anticaptcha/Lobby - Gitter
Could you provide website which you are interested in and data for form in ... Can't bypass captcha as there is no submit...
Read more >
Solve reCAPTCHA 2 in Selenium (Using Python)
How to solve any captcha using Selenium and AntiCaptcha plugin solver. ... I.e. this captcha solving method isn't free, but it's not expensive...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found