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

243
Vistas
Cypress, look for multiple parameters like ID and Class

I was wondering if it's possible to search by multiple parameters in cypress, for example ID and Class

it('find button',function(){ 
   cy.get('#button_id, .button-class').click()
})

is this something that is achievable???

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Yes you can directly use #button_id.button-class

it('find button',function(){ 
   cy.get('#button_id.button-class').click()
})

In my local I cross created this element:

<div class="titleclass" id="titleid">Apple</div>

And in the test runner if you could see, I was able to use both class and id cy.get('#titleid.titleclass') and successfully get the element.

Test runner screenshot

about 4 years ago · Juan Pablo Isaza Denunciar
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