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:
$(\"#
From our discussion in the comments, my guess is that you'll want to fire a change event for each input you plan on modifying.
var element = document.getElementById('emailAddress'),
event = {
target: {
value: 'new value for the input'
}
};
element.onchange(event);
//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)