VBA System User Input

Asked

Viewed 28 times

0

Good afternoon, my friends. I arose a demand here in the company in which I do not understand much that would be in VBA I am sql programmer and went to learn a bit of vba to be able to automatically extract some information. The Code below would be to log into the web system in question.

Dim i As SHDocVw.InternetExplorer
Set i = New SHDocVw.InternetExplorer
i.Visible = True
Email = ""
Password = ""
i.Navigate ("infelizmente não posso divulgar")
Do While i.Busy = True Or i.readyState <> 4
Loop
Dim idoc As MSHTML.HTMLDocument
Set idoc = i.document
idoc.querySelector("input[placeholder*=Username]").Value = Email
'idoc.querySelector("input[placeholder*=Password]").Value = Password
End Sub

And the html code would be this.

<input type="text" class="form-control ark-login-username ng-pristine ng-valid ng-empty ng-touched" ng-model="$ctrl.username" ng-attr-placeholder="{{ $ctrl.loginForm.username }}" placeholder="Username" style="">

I’ve tried using this method on other sites to see if it wasn’t the code itself and it works.

Somebody give me a hand, I’m going crazy already rsrs

Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.