A
A
AnanasMaks2021-12-20 20:54:30
Python
AnanasMaks, 2021-12-20 20:54:30

Need help with iframe in selenium?

I am writing a parser for a site and I need to go through captcha here, I made sure that when I started the parse, I had an extension for working with captcha, I switch to the iframe of the site in order to continue working with captcha through the parser, but I get an error and Parser closes, please help!

iframe = driver.find_elements_by_tag_name('iframe')[0]
    driver.switch_to.frame(iframe)
    recapcha = driver.find_element_by_id("solver-button")
    recapcha.click()
    time.sleep(10000)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freemailroot, 2021-12-20
@freemailroot

By xpath, id, class tried to search? iframe is necessarily [0] and not [1]?
By the way, for the sake of interest, how do you want to solve this captcha?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question