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

95
Views
Click on button based on text in table

I need to click on the edit button of a certain text in a table.

For example the table row has the text abc i need to click on the icon-pencil of this particular row text

I have tried:

cy.contains('td', 'abc')
            .scrollIntoView()
            .siblings()
            cy.get('td div').within(() => {
                cy.get('.actions').and('have.class','icon-pencil').click()
                })

but it is not finding the class actions

This is the html:

enter image description here

Please let me know what is wrong. thank you

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

0

You have to do something like this:

cy.contains('td', 'abc')
  .parent('tr')
  .within(() => {
    cy.get('i.icon-pencil').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!