Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to empty a filled input in cypress

cy.get('[type="text"]').clear() // Clear text input
cy.get('textarea').type('Hi!').clear() // Clear textarea
cy.focused().clear() // Clear focused input/textarea
Source by docs.cypress.io #
 
PREVIOUS NEXT
Tagged: #empty #filled #input #cypress
ADD COMMENT
Topic
Name
2+1 =