Lets say I have table which consist of some values. To get the value from specific cell I can use this code to check whether it contains some text:
cy.get('table > tbody > tr:nth-child(1) > td:nth-child(1)', {timeout: 15000}).should('have.text', "Ketchup")
How can I assert/check if that text has minimum length of 5?
I tried using
cy.get('table > tbody > tr:nth-child(1) > td:nth-child(1)', {timeout: 15000}).its('text').should("have.length", 5)
})
But it does not work.