Cypress · Junior · Question 19 of 75
Which assertion checks an input's value?
- 1
.should('have.value', 'John') - 2
.should('have.text', 'John') - 3
.should('equal.value', 'John')
Show the answer
Correct answer: .should('have.value', 'John')
Explanation
Input values aren't text content. have.value reads the current value; have.text reads text nodes.