“Python Selenium recibe texto de div” Código de respuesta

Seleccione texto en una pitón Div Selenium

    price = driver.find_element_by_xpath("//div[@class='price inlineBlock strong mediumText']")
    price_content = price.get_attribute('innerHTML')
    print price_content.strip()
Stupid Stag

Python Selenium recibe texto de div

# Don't use find_element_by_class use find_element_by_xpath

textFromDiv = driver.find_element_by_xpath("//div[@class='']").text
Cooperative Cobra

Cómo recibir el texto de una etiqueta en Selenium Python

element.text
Odd Ox

Respuestas similares a “Python Selenium recibe texto de div”

Preguntas similares a “Python Selenium recibe texto de div”

Más respuestas relacionadas con “Python Selenium recibe texto de div” en Python

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código