How can I modify the cypress selector to only highlight the buttons that have "COVID" in the...

Discussão em 'Angular' iniciado por Neil Harris, Novembro 19, 2024.

  1. Neil Harris

    Neil Harris Guest

    selector highlighting all 4 buttons

    code for "COVID-19 Resume" element

    This selector:

    cy.get('.mat-mdc-row[data-canedit="true"]:has(.mat-column-categories>span) .mat-column-actions button[id^=actionMenu]')


    highlights all 4 buttons in the far-right column. How can I modify it to where only the buttons in the same row as the "COVID-19-Resume" category get selected.

    I tried

    .mat-mdc-row[data-canedit="true"]:has(.mat-column-categories>span:contains("COVID")) .mat-column-actions button[id^=actionMenu]


    But that showed 0 results.

    Continue reading...

Compartilhe esta Página