Update:
If I am filling out the AngularJS Forms with simple code below.
document.getElementByID("username").value = "ZSAdmin"
document.getElementByID("password").value = "SuperSecure101"
how can I cause the AngularJS Form validation before calling:
document.querySelectorAll("form[name='loginForm'] button.icon-login")[0].click()
<form name="loginForm" ng-submit="login()" autocomplete="off" class="ng-dirty ng-valid ng-valid-required">
<button type="submit" class="icon-login" ng-disabled="!loginForm.$valid"></button>
<input type="text" name="username" id="username" placeholder="Username / Email" autocapitalize="off" autocorrect="off" required="" ng-model="credentials.username" class="ng-dirty ng-valid ng-valid-required">
<input type="password" name="password" id="password" placeholder="Password" autocapitalize="off" autocorrect="off" required="" ng-model="credentials.password" class="ng-dirty ng-valid ng-valid-required">