I know there are alot of questions like this one, but none seems to work.
This is the code i'm using
try:
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, 'captcha_input'))
)
print("done")
except:
print("error")
There is an iframe in the page but the element im looking for isn't inside it, but I tried it anyways:
try:
iframe = driver.find_element_by_xpath("/html/body/iframe")
driver.switch_to.frame(iframe)
element = WebDriverWait(driver, 10).until(
EC.presence_of_element_located((By.ID, 'captcha_input'))
)
print("done")
except:
print("error")
The output of both is "error". Any ideas?