I'm not an expert in Javascript but I have a task: I need to paste a search query in Google search and then press Enter key using only Javascript.
I paste a search query like this:
document.querySelectorAll("input")[4].value="Cat"
How can I simulate Enter key press?
I know that I can paste using:
document.location.href = 'https://www.google.ru/search?q=Cat';
But this solution is not suitable for me because I do not work with Google, but my problem is similar that I described. Plus I use Android WebViev (Chromium) and it does not support JQuery.