For automated tests using Cypress, how to capture element values where values are not showing...

Discussão em 'Angular' iniciado por mahadi hasan, Outubro 15, 2024.

  1. mahadi hasan

    mahadi hasan Guest

    In our web application built with Angular, there some places where angular forms are used and due to that html elements values are not present in the html body.

    We are implementing automated tests using Cypress for this angular web application. Wondering is there is anyway we can track the values of such elements?

    [​IMG]

    [​IMG]

    We tried several ways to catch as bellow but unfortunately no luck.

    cy.get('*[data-test="employee-details-contact-city"]').should('have.text', 'Kista')
    cy.get('.address-detail-container > .mat-mdc-tooltip-trigger').should('have.text', 'Kista')
    cy.get('.mat-mdc-tooltip-trigger:nth-child(3)').should('have.text', 'Kista')


    Let us know if adding more information's may help in this case. Thanks in advanced.

    Continue reading...

Compartilhe esta Página