Switch to an iframe through Selenium and python

You can use an XPath to locate the <iframe>:

iframe = driver.find_element_by_xpath("//iframe[@name="Dialogue Window"]")

Then switch_to the <iframe>:

driver.switch_to.frame(iframe)

Here’s how to switch back to the default content (out of the <iframe>):

driver.switch_to.default_content()

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)