Login Form in Clockify
Even though you are changing the values of the input
DOM objects, that is not enough to trigger the change detection of the underlying Angular libraries, thus making the form appear 'empty'.
The following pure JS example works on Chrome, but I have not tested it in Internet Explorer:
let email = document.getElementById("email");let password = document.getElementById("password");let button = document.getElementsByTagName("button")[0];email.value = 'someone@example.com';password.value = 'yourpassword';// Trigger change detectionemail.dispatchEvent(new Event('input'));password.dispatchEvent(new Event('input'));button.click();
In case dispatchEvent
does not work in IE, you could try with createEvent
and initEvent
. See dispatchEvent not working in IE11