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

96
Visualizações
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 Respostas
Responde à pergunta

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 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