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

171
Vistas
extract text with the same name used multiple times

What i want is to check that "ZZ" is showing in the table row considering that i can have other rows with the same "ZZ" in the same cell name.

i have done this so far:

 cy.contains('tr', 'abc...')
            .parent()
            .within(()=> {
                cy.get('td.v-cell').should('have.text', 'ZZ')
        })

I am getting: expected [ <td.v-cell>, 19 more... ] to have text ZZ, but the text was 20%20%5%0%20%-0-20%-20%-ZZ

I have this html: https://i.stack.imgur.com/k224U.png

How do i verify the text even if the text can appear in other rows as well..Also if i change ZZ to 20% it should be getting error as the text is ZZ.

Thank you

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

0

Instead if have.text you can use include.text something like:

cy.get('td.v-cell').should('include.text', 'ZZ')

Assuming abc is a td element, you can do like this:

cy.contains('td', 'abc...')
  .parent()
  .within(() => {
    cy.get('td.v-cell').should('include.text', 'ZZ')
  })

Again assuming that the tr you want to go is the immediate next:

cy.contains('td', 'abc...')
  .parent('tr')
  .next()
  .within(() => {
    cy.get('td.v-cell').should('include.text', 'ZZ')
  })
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