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

125
Views
Cypress doesn't find original ids of HTML

I have a problem with cypress. I have an HTML where elements have their own ids containing numbers in increasing order (1009, 1010...). The problem is that when I pass these indices to the test, it cannot find the elements. Inspecting the window of cypress of my website, the ids contain different numbers, that's why Cypress cannot see them, but I don't understand why. Has someone an idea about that? I cannot share the code because it is for work, but i hope I've been clear enough.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Without code it's very difficult but it sounds to me like you have dynamic ids so try using selectors that will pick the elements despite the ids changing every time your test runs.

It's recommended (when you can) to ask the devs to have a dedicated attribute to avoid this kind of stuff happening but when you can't, there are other ways.

Here's a link to cypress best practices to select elements and isolate them

https://docs.cypress.io/guides/references/best-practices#Selecting-Elements

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!