https://cypress.io logo
When using type() first letter gets cut out
# i-need-help
b
Hello, when i try to type into a textfield thie first characters are missing. cy.get('[data-cy="textfield"]') .focus() .clear() .type("Hello World!", {timeout: 10000}) .should('have.value', 'Hello World!');
e
Try typing and then afterwards checking that value.
Copy code
cy.get('[data-cy="textfield"]')
      .focus()
      .clear()
      .type("Hello World!");                                                     cy.get('[data-cy="textfield"]').should('have.value', 'Hello World!');
g
Your event handlers are probably slow to process the clear event
s
Try this to make the type faster
4 Views