I am sending form data to a login/password and then wanting to click the submit button, the problem is with the form validation requiring the form to be dirty. And I am directly assigning the values which means the form is not considered dirty and modified. I have tried focus but that doesn't seem to work either. The submit button won't appear because it isn't validated.
document.getElementById("email").focus();
document.getElementById("password").focus();
var e = document.getElementById("email");
e.value = 'currentEmployee@email.com';
var p = document.getElementById("password");
p.value = 'currentEmployee.password';
var osbut = document.getElementById("loginForm"); osbut.submit();
I am injected a script via a chrome extension, running it as a content.js script. Any help is appreciated.