Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

315
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda