I am trying to login to a webpage using VBA, but I am unable to get it done. The issue is after the username and password punched, when clicking the signin button the webpage gives an error as "Required field" so basically the credentials are not entered.
I have also tried to set the value to the attribute using IE.document.getElementById("email").setAttribute("Value") = "XX" but still is throws the same error. I have also tried .focus method too but no luck.
I hope I have explained my issue, kindly excuse for any errors. The webpage link "" https://dashboard.stripe.com/login"" I cannot share the credentials as it is confidential."
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate "https://dashboard.stripe.com/login"
Do Until Not IE.busy: DoEvents: Loop
Set doc = IE.document
Do While doc.ReadyState <> "complete": DoEvents: Loop
IE.document.getelementbyid("email").Value = "[email protected]"
IE.document.getelementbyid("password").Value = "a"
Set ElementCol = IE.document.getElementsByTagName("span")
For Each link In ElementCol
If link.innerHTML = "Sign in to your account" Then
link.Click
End If
Next