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

313
Vistas
How to select item from drop down menu

I'm doing an automatic test in Cypress and I have a problem catching the first checkbox in the drop down menu box:

enter image description here

And the code what I tried:

 cy.get('.dx-texteditor-container', { timeout: 5000 }).eq(3).click().eq(0)
                    .within(() => {
                        cy.wait(500);
                        cy.get('.dx-list-select-all-label', { timeout: 5000 }).should('be.visible')
                            .click();
                    }) 

The code itself looks like this:

code

I've been catching it for a few days now and nothing yet. Any advice?

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

0

Assuming this opens the dropdown:

 cy.get('.dx-texteditor-container', { timeout: 5000 }).eq(3).click()

After this you can write:

cy.contains('.dx-list-select-all-label', 'Vybrat vše').should('be.visible').click()
about 4 years ago · Juan Pablo Isaza Denunciar

0

You seem to be trying to click the label instead of the checkbox.

The checkbox is usually an input of type checkbox like:

<input type="checkbox" ...>

And from your picture, it should be right besides your label inside that div here: enter image description here

And something like that should do:

cy.get('div.dx-list-select-all-checkbox').find('input[type=checkbox]').check({ force: true })

I added { force: true } because in many web framework, the input of type checkbox is hidden behind divs to make styling easier. You may not need it. See check() docs here.

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