I have created a VBA code to auto fill username and password on the website. When I click the button, the Username and password get filled up automatically but it says please enter the mandatory field. Please help!
Sub GST_Login()
Dim IE As Object
Dim objelement As Object
Dim c As Integer
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "https://www.gst.gov.in"
While IE.Busy
DoEvents
Wend
IE.Visible = True
On Error Resume Next
For i = 1 To IE.Document.All.Length
If IE.Document.All.Item(i).innerText = "Login" Then
IE.Document.All.Item(i).Click
Do Until Not IE.Busy And IE.readyState = 4
DoEvents
Loop
' Input the username and password
IE.Document.getElementById("username").Value = "Test123"
IE.Document.getElementById("user_pass").Value = "Test@1"
End If
Next i
Set IE = Nothing
End Sub