https://cypress.io logo
Set value for Input directly
# i-need-help
q
Hey, i want to set a value directly into an input instead of using
type
, because each key stroke triggers a validation function. And it happens often that some requests get stuck in cypress (network tab is showing the correct behavior, cancelled and finished requests). Is there a way to directly set a value into the input, so my validation would only trigger once? Because currently there is an issue with cancelled requests, I just discovered https://github.com/cypress-io/cypress/issues/19326
g
you can try using the invoke method. cy.get('your_input').invoke('val', your_var) problem with this it might not kick off your validation, but it's worth trying it and seeing what happens.