Cypress · Junior · Question 12 of 75
How do you type into an input in Cypress?
- 1
cy.get('#email').type('a@b.co') - 2
cy.get('#email').value('a@b.co') - 3
cy.get('#email').fill('a@b.co')
Show the answer
Correct answer: cy.get('#email').type('a@b.co')
Explanation
.type() sends key events one by one. Special keys use braces, like {enter}. To clear first, chain .clear().