I have a manual "watch" on the only item in elements1a and I would like to be able to export all the properties (I think they are called "expressions", but I have not found the correct naming yet).
So that I can compare the properties(every dropdown possiblility/expression such as: "checked", "innerText" etc. ) of the item with itself after a manipulation of the item.
My XY-problem is to mark a checkbox in a website I let vba open in ie. However even though the checkbox shows as being marked, I noticed the difference between when I let VBA do it, and manually clicked myself is that the class of the element changes to "dirty.." instead of "pristine.." after clicking.
Without that change to "dirty.." and touched, the website does not register the action as actually performed.
So I tried to set the properties of the "dirty..." class to checked, but it did not register the action as performed, So I want to compare all the properties of the "dirty.." and "pristine.." class, to see if I can make it register the action as performed by changing all the expressions required to make it dirty.
Set elements1a = ie.document.getElementsByClassName("ng-valid ng-touched ng-dirty ng-valid-parse")
MsgBox (elementa1a)
For Each Item In elements1a
elements1a.Item.Checked = True
elements1a.Item.complete = True
MsgBox (elements1a.Item.className & " and " & elements1a.Item.Checked)
If elements1a.Item.className = "ng-valid ng-touched ng-dirty ng-valid-parse" Then
elements1a.Item.Checked = True
MsgBox (elements1a.Item.Checked)
'<form name="forms.addressContract" class="form __hor ng-scope ng-valid-maxlength ng-valid-pattern ng-invalid ng-invalid-required ng-valid-parse ng-pristine" novalidate="" ng-class="{'force-show-errors': isSubmitted}" ng-submit="submitAddress()">
'<form name="forms.addressContract" class="form __hor ng-scope ng-valid-maxlength ng-valid-pattern ng-invalid ng-invalid-required ng-valid-parse ng-dirty" novalidate="" ng-class="{'force-show-errors': isSubmitted}" ng-submit="submitAddress()">
End If
Next
Aucun commentaire:
Enregistrer un commentaire