Trying to click n reCAPTCHA

40 Views Asked by At

I have been trying to submit form here: https://attirealleykurtaset.in/challenge#contact_form

Then I am getting reCAPTCHA and not able to click on with with below code:

checkbox=WebDriverWait(driver,20).until(EC.element_to_be_clickable(By.XPATH,'//*[@id="recaptcha-anchor"]'))
checkbox.click()

The error I am getting is : 'element_to_be_clickable() takes 1 positional argument but 2 were given'

Can somebody please help me out?

1

There are 1 best solutions below

0
Shawn On

Change the code as below:

checkbox=WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.XPATH,'//*[@id="recaptcha-anchor"]')))

Notice the additional parenthesis around By.XPATH,'//*[@id="recaptcha-anchor"]'