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

109
Views
How to write click function for icon using cypress

I have 3 icons icon image

and html part is

Need these 3 icon click ?How to do this, its have same class name, same id

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

0

You can use the src attribute for this. I could see in the html image that there are two diff type of icons - GlobalCOnfig and Customer. SO you can do something like:

cy.get('[src*="/static/media/GlobalConfig"]').click()
cy.get('[src*="/static/media/Customer"]').click()
about 4 years ago · Juan Pablo Isaza Report

0

If you want to address the first one of these use .eq(0), for the 2nd .eq(1)and so on.

cy.get('#panelid-header).eq(0).click()

If you want to click all of them in succession

cy.get('#panelid-header).each(($el) => {
   cy.get($el).click()
   })
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!