“selenio iframe python” Código de respuesta

Selenium Python Switch a iframe

# go to iframe
driver.switch_to.frame(iframe)

# back to previous frame
driver.switch_to.parent_frame()
marcofaga

selenio iframe python

self.driver = webdriver.Firefox()

## Give time for iframe to load ##
time.sleep(3)
## You have to switch to the iframe like so: ##
driver.switch_to.frame(driver.find_element_by_tag_name("iframe"))
## Insert text via xpath ##
elem = driver.find_element_by_xpath("/html/body/p")
elem.send_keys("Lorem Ipsum")
## Switch back to the "default content" (that is, out of the iframes) ##
driver.switch_to.default_content()
miletoo

Respuestas similares a “selenio iframe python”

Preguntas similares a “selenio iframe python”

Más respuestas relacionadas con “selenio iframe python” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código