I'm trying to do some browser automation and the page that I am trying to do this on will not work if i just do a value = . Seems like, when I type and click out, it will actually autocorrect the value inside the field and validate it.
If this code below dispatch a real event, how to I get the event to show up the letter "a" inside my input field?
window.dispatchEvent(new KeyboardEvent('keydown', {
'key': 'a'
}));