• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How do i open it on chrome and auto login without any click

Ankur Kumar

New Member
Dear All,

I want to access a website with auto login without any click on webpage, here is my coding below please help how do i do it.

Code:
Sub HTML_Element_Printer()

On Error GoTo Err_Clear
sURL = "https://www.instamojo.com/accounts/login"
Set oBrowser = New InternetExplorer
oBrowser.Silent = True
oBrowser.timeout = 45
oBrowser.navigate sURL
oBrowser.Visible = True

Do
' Wait till the Browser is loaded
Loop Until oBrowser.readyState = READYSTATE_COMPLETE

Set HTMLDoc = oBrowser.document

HTMLDoc.all.id_login_username.Value = "ABC"
HTMLDoc.all.Password.Value = "AB@123"

For Each oHTML_Element In HTMLDoc.getElementsByTagName("input")
Debug.Print oHTML_Element.Name
Next

' oBrowser.Refresh ' Refresh If Needed
Err_Clear:
If Err <> 0 Then
Err.Clear
Resume Next
End If
End Sub
 
Last edited by a moderator:
Back
Top