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

205
Visualizações
Cypress: How to do a cy.type without a click

I'm curious as to why cypress seems to be triggering a click at the beginning of the .type() command. Here's the whole command I'm trying to run:

cy.contains(".rt-tr", "Taoh").type("{downarrow}");

Unfortunately as you can see in the picture below, this type action seems to trigger a click: debugger stack of click event being fired when the cy.type command is run

I can potentially understand why that might make sense in order to bring that element into focus, but what about if that element IS already focused.

I tried doing

cy.contains(".rt-tr", "Taoh").click().type("{downarrow}");

And it seems to trigger 2 click events. This is confusing to me. Any way to avoid that click would be appreciated. Thanks!

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

0

Op was able to solve it by adding .focus

cy.contains(".rt-tr", "Taoh").focus().type("{downarrow}")
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