“Python selênio Get Image Src” Respostas de código

Python selênio Get Image Src

driver.find_element_by_id("element_id").get_attribute("src")
Navid2zp

Selênio python Get Image do URL

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains

wait = WebDriverWait(browser, 20)
actions = ActionChains(browser)

product_img_xpath = '//div[contains(@class,"s-item")]//img'
wait.until(EC.visibility_of_element_located((By.XPATH, product_img_xpath)))
time.sleep(1)

imgs = browser.find_elements_by_xpath(product_img_xpath)
for img in imgs:
    actions.move_to_element(img).perform()
    print(img.get_attribute('src'))
Jealous Jaguar

Respostas semelhantes a “Python selênio Get Image Src”

Perguntas semelhantes a “Python selênio Get Image Src”

Mais respostas relacionadas para “Python selênio Get Image Src” em Python

Procure respostas de código populares por idioma

Procurar outros idiomas de código