-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selenium not submitting form with anticaptcha #47
Comments
Can you provide the correct values in the form? I tried to fill it in, but I can't figure out any ID because I don't know the system. I write below notes in this area: driver.get(site_url)
script = '''
// Not always form captcha-protected
if(document.getElementById("g-recaptcha-response")) {{
document.getElementById("g-recaptcha-response").innerHTML = "{0}";
}};
'''.format(token);
driver.execute_script(script)
driver.find_element(By.XPATH, '//input[@formcontrolname="custId"]').send_keys("??")
driver.find_element(By.XPATH, '//input[@formcontrolname="custPhone"]').send_keys(
"0528880337"
)
driver.find_element(By.XPATH, '//input[@formcontrolname="custId"]').click()
WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.CLASS_NAME, "login__form"))
).click()
submit_button = WebDriverWait(login_form, 10).until(
EC.element_to_be_clickable((By.CLASS_NAME, "login__form__button"))
).click() |
Closed due submitter inactivity. Feel free to write comment and ask to reopen if you have still that issue. |
Hey @ad-m! I've been trying to make it work on the website http://servicos.dnit.gov.br/multas/LogIn but without success... I was able to get the sitekey and to find the <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>. However, I cannot make the form submit after I add the token to this textarea. Do you have any clue to help me here? |
Please provide any valid form data. I am not from the same country as you and I cannot guess these values. |
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>URLULR = https://www.nike.com.br/Snkrs/Produto/Air-Max-1-Premium/153-169-211-208971 |
@ScrimForever , could you share on what operation on nike.com.br do you notice that issue? I was attempt to reproduce captcha, but i don't know when it's triggered. |
If you're still struggling, hmu on discord @ Paulie#2222 |
problem solved |
@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.
I got token succesfull but I don't know what is not woking when i'm trying to submit form.
The text was updated successfully, but these errors were encountered: