Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

128
Vistas
Find all elements with a specific CSS property

I'm using Selenium to find elements in a webpage that contain the CSS property overflow-y: scroll or overflow-y: auto. Currently, I'm using the following code:

element = driver.find_element_by_xpath(
                "//*[contains(@style,'overflow-y: scroll')] | //*[contains(@style,'overflow-y: auto')]")

This will find me all the elements that have a style attribute with vertical overflow set to scroll/auto.

However, this won't find me elements that have this attribute set in their external CSS. To solve this, the first and rather naive solution that has come to my mind is to iterate over the DOM and check each element's CSS. Does anyone know a faster solution, possibly with Xpaths?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda