Я пытаюсь ввести пароль в поле пароля для HTML кода ниже:
<input name="customerPassword" type="password" class="customer-password form-control ng-dirty ng-valid-required filled ng-valid ng-valid-minlength" ng-class="{
'input-error': submitted && securityForm.customerPassword.$invalid,
'filled': securityForm.customerPassword.$viewValue.length>0}" ng-minlength="7" maxlength="20" ng-model="customer.password" ng-keydown="checkEnterKey(event)" required="" autocomplete="new-password" aria-autocomplete="list">
<b class="into-input">Password</b>
<div class="ct-icon ng-hide" ng-show="securityForm.$invalid">
<div class="ct-tooltip">
<i class="fa fa-info-circle fa-lg info"></i>
<div class="tooltip">
<div class=""><p>This is the password you created when you registered for Internet Banking. </p></div>
</div>
</div>
</div>
<met-tooltip category="login" key="input-password" ng-show="securityForm.$valid" icon="check" class="valid-number met-tooltip-bg-green ng-isolate-scope"><span> <!-- ngIf: !tooltip.inline --><a ng-if="!tooltip.inline" href="javascript:void(0)" tabindex="-1" tooltip-trigger="" tooltip-placement="" tooltip-html-unsafe="<p><span style="line-height:20.8px">Password entered.</span></p>
" tooltip-popup-delay="100" class="ng-scope"> <i data-ng-click="goTo()" class="fa fa-check-circle"></i> </a><!-- end ngIf: !tooltip.inline --> <!-- ngIf: tooltip.inline --></span></met-tooltip>
<a ng-if="!tooltip.inline" href="javascript:void(0)" tabindex="-1" tooltip-trigger="" tooltip-placement="" tooltip-html-unsafe="<p><span style="line-height:20.8px">Password entered.</span></p>
" tooltip-popup-delay="100" class="ng-scope"> <i data-ng-click="goTo()" class="fa fa-check-circle"></i> </a>
См. Ниже мой фрагмент кода VBA:
Dim event_onChange As Object
Set event_onChange = ie.document.createEvent("HTMLEvents")
event_onChange.initEvent "keydown", True, False
.document.querySelector(".customer-password").dispatchEvent event_onChange
Там немного кружок, который появляется, когда я ввожу пароль вручную, но не появляется после того, как я запускаю над кодом VBA. Как это возможно сделать с VBA?