ferocious12
Member
Hi All,
I am using the the following code to sign in to a website. The code correctly enters the username and password. While clicking the sign in button username and password is erased. Can you please help me to successfully login.
Thanks
I am using the the following code to sign in to a website. The code correctly enters the username and password. While clicking the sign in button username and password is erased. Can you please help me to successfully login.
Thanks
Code:
Sub Daralogin()
Dim ie As SHDocVw.InternetExplorer
Dim idoc As MSHTML.HTMLDocument
Dim username As HTMLInputElement
Dim Passw As HTMLInputElement
Dim signin As Object
Set ie = New SHDocVw.InternetExplorer
ie.Visible = True
ie.navigate "https://sellercenter.daraz.lk/seller/login?redirect_url=https%3A%2F%2Fsellercenter.daraz.lk%2Fproduct%2Fpublish%2Findex%3Fspm%3Da2o7e.10547927.old-navigation.3.50f42a97yqWAyz"
Do While ie.readyState <> READYSTATE_COMPLETE
Application.StatusBar = "Loading"
Loop
Set idoc = ie.document
Set username = idoc.getElementById("TPL_username")
username.Value = "cobbler2050@gmail.com"
Set Passw = idoc.getElementById("TPL_password")
Passw.Value = "Cobbler1981"
Set signin = idoc.getElementsByClassName("next-btn next-btn-normal next-btn-medium btn")
signin(0).Click
End Sub
Last edited: