Chris M
0
Q:

cypress check element have attribute

cy.get('selector')
	.should('have.attr', 'aria-checked', 'true')
2
cy.get('input').invoke('attr', 'placeholder').should('contain', 'username')
0
// have.attr comes from chai-jquery
cy.get('#header a').should('have.attr', 'href', '/users')
0

New to Communities?

Join the community