How can I keep looking for elements in a #document:
<div>
<iframe>
#document
<html>
<body>
<div>
Element I want to find
</div>
</body>
</html>
</iframe>
</div>
I think your problem is not with the a#
document but with iframe
.
from selenium import webdriver
driver = webdriver.Firefox()
iframe = driver.find_elements_by_tag_name('iframe')[0]
driver.switch_to.frame(iframe)
driver.find_element_by_xpath("//div")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With