skip to Main Content

Check attribute of element HTML

I would like to click on an element and check if the selected attribute is true Here is my code function clickOnInterface(pos, interfaceName) { cy.get('[data-test="interface-list"]').contains(interfaceName).click(); cy.get(`[data-test="interface-list"] ix-event-list-item:nth-child(${pos})`) .should("have.attr", "selected", "true"); } Cypress gives me this error: Timed out retrying after…

VIEW QUESTION
Back To Top
Search