Issue
I have to validate the font color as red for some set of condition. So that, I have implemented the below assertion for achieving that,
return cy.xpath(`xpathcondition`)
.should('have.css','-webkit-text-fill-color','rgb(208, 25, 71)')
Its worked for me.
The same thing I have to validate it should not be red for some other set of condition. Could anyone suggest me how to achieve this
Solution
You can use the not
assertion.
cy.xpath(xpathcondition).should(
'not.have.css',
'-webkit-text-fill-color',
'rgb(208, 25, 71)'
)
Answered By - Alapan Das
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.