Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

cypress element css

cy
  .get('nav')                          // yields <nav>
  .should('be.visible')                // yields <nav>
  .should('have.css', 'font-family')   // yields 'sans-serif'
  .and('match', /serif/)               // yields 'sans-serif'
Source by docs.cypress.io #
 
PREVIOUS NEXT
Tagged: #cypress #element #css
ADD COMMENT
Topic
Name
9+5 =