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

130
Visualizações
Click multiple: true cypress

I have a page where I land that have about 15 icons on it all with the same source. The way im grabbing each element looks like this:

cy.get('[src="someSource"]').click({ multiple: true })

The issue that have is that after clicking on an icon I have a model that pops up where I need to click another button before I can continue to the next icon.

I there a way for me to add another click in between each of these icons ?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Here's my previous answer cut down as your requirements are different.

You'll need to check the modal selectors for differences.

cy.get("selector").each(($el) => {

  $el.click();  // actually no need to wrap as click works in jQuery
  
  cy.get(".modal-dialog").should('be.visible');
  cy.get(".modal-dialog button[type='submit']").click();

  cy.get(".modal-dialog").should('not.be.visible');  // wait for modal to go before next click
})
about 4 years ago · Juan Pablo Isaza Relatório

0

You can use each() for this:

cy.get('[src="someSource"]').each(($ele) => {
  cy.wrap($ele).click()
  //code to click the modal button
})
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