how to verify the text color in cypress
senthkum opened this issue · comments
senthkum commented
Hi Team,
I have a requirement to verify the text color from the application, I googled and tried with multiple code and it did not work, can you please help me with the code.
cy.get('.ico-logout').should('have.css', 'color', '#AF0304')
cy.get('.ico-logout').should('have.css', 'color').and('be.colored', '#AF0304')
Thanks
Senthil. M
Gleb Bahmutov commented
See the recipe https://github.com/cypress-io/cypress-example-recipes/tree/master/examples/extending-cypress__chai-assertions - you need to install additional NPM module with that assertion