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()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…