For a certain condition, I needed to ensure that the font color is red. To achieve this, I used the following assertion:
return cy.xpath(`xpathcondition`)
.should('have.css','-webkit-text-fill-color','rgb(208, 25, 71)')
It worked perfectly for me.
Now, I need to validate that the font color should not be red for another set of conditions. Can anyone suggest how I can accomplish this?