I am writing a chrome extension to set an ASP.NET website textbox but the site doesn't recognize the input from the javascript. For testing purposes I am using this example Set value active input in active page from chrome extension with the proper changes to fit my needs.
The issue is that when extension sets the textbox value form is not auto submitted as if I was typing physically the input.
Here are the changes on the content.js
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function demo() {
document.getElementById('addresses').value = 'π';
await sleep(200);
document.getElementById('addresses').value = 'πα';
await sleep(200);
document.getElementById('addresses').value = 'παρ';
await sleep(200);
document.getElementById('addresses').value = 'παρν';
await sleep(200);
document.getElementById('addresses').value = 'παρνα';
}
demo();
//document.getElementById("dnn_ctr654_View_ctxSearchZipCode_btnSearchZipCode").click()
I even tried to force the submission of the form but no luck!