P
P
Proger59132021-05-05 14:58:29
Python
Proger5913, 2021-05-05 14:58:29

How to activate button in Selenium after solving ReCaptcha?

Hello, this is the problem.
Here is the site : https://all-access.wax.io
I also fill in the username and password. But the Login button is not activated and there is no way to click on it.

Here is the code to quickly show the response input field from the recaptcha:

document.getElementById("g-recaptcha-response").style.display = "block";
document.getElementById("g-recaptcha-response").style.position = "absolute";


The language does not really matter, the main thing for me is to somehow enter the site after these manipulations)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-05-05
@SoreMix

The "disabled" property of the element is responsible for this.
In fact, you just need to turn it off. In the code, I'm looking for several buttons, because the site developer decided to make separate buttons for different designs....

login_btns = driver.find_elements_by_xpath('//button[text()="Login"]')
for login_btn in login_btns:
    driver.execute_script("arguments[0].disabled=false", login_btn)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question