Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
How to find an element in Cypress on a specific line

I'm looking for a way to use Cypress to identify the trash can icon, provided you have to select a line with specific text, in this case Cypress. The solution I tried is as follows:

var btndelete = cy.get('#SCGrouGrid').find('.dx-data-row').contains('UICypress').then("td").eq(5).find(".dx-icon-trash");

Here is HTML of the web Here is UI

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can do something like this:

cy.contains('td[role="gridcell"]', 'Cypress')
  .parent('tr.dx-data-row')
  .within(() => {
    cy.get('.dx-icon-trash').click()
  })

First, it will search for the td element where the text Cypress is. Then using parent, we go to the tr or row of the element where our text is. Them using within we are making sure the command we are running is scoped to that particular row only. Then we are clicking on the Trash icon inside within.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda