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

204
Views
Cómo encontrar un elemento en Cypress en una línea específica

Estoy buscando una forma de usar Cypress para identificar el ícono de la papelera, siempre que tenga que seleccionar una línea con un texto específico, en este caso Cypress. La solución que probé es la siguiente:

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

Aquí está el HTML de la web. Aquí está la interfaz de usuario

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

0

Puedes hacer algo como esto:

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

Primero, buscará el elemento td donde está el texto Cypress . Luego, usando parent, vamos al tr o fila del elemento donde está nuestro texto. Al usarlos within , nos aseguramos de que el comando que estamos ejecutando tenga un alcance solo para esa fila en particular. Luego estamos haciendo clic en el ícono de la papelera dentro.

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!