Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!