I\'m trying to write a bookmarklet to autofill a form, to simplify manual testing. The site is implemented in React. I\'ve tried using JQuery, for example:
//find element
let elem = document.querySelector("#emailAddress");
//create event
let event = new Event('input', { bubbles: true });
//set value
elem.value="bob@example.com";
//trigger event
elem.dispatchEvent(event)