I have an VueJS app (compiled) and there is an input field and a submit button. The button checks if the input isnt empty. When i type the value in the input and press the button it works ok.
Can I set the input value via javascript ( from chrome console ) ?
I tried with
document.querySelectorAll('.form input')[0].dispatchEvent(new Event('focus'));
document.querySelectorAll('.form input')[0].value = 1
document.querySelectorAll('.form input')[0].dispatchEvent(new KeyboardEvent('keypress',{'key':'1'}));
and then pressing the submit button but it says "field is empty". Seems like doing that doesnt update the model.
Any help?
Thank you