how to find username/passowrd controls

  • Thread starter Thread starter thomas donino
  • Start date Start date
T

thomas donino

I need to navigate to a webpage, and login with user and pass.
How do I know what the webpage is looking for for the username, meaning
user, or username or accountname etc etc
my current code using
variablename.value = "user" is where the code is barfing
 
Joel,

I went to the html code and I see the they are called name and id instead of
username and password.

The code I have is below and doesn't work. I am certain I am doing something
wrong in the Set ipf.document section

Public Sub Login()

Dim ipf As Object
Dim username As String
Dim pass As String
username = "x"
pass = "x"

Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.Navigate "www.elliottwave.com/"
Do Until .ReadyState = 4
DoEvents
Loop

'*****************************************
'section in question

Set ipf = .Document.all.Item("name")
ipf.Value = username
Set ipf = .Document.all.Item("id")
ipf.Value = pass
Set ipf = .Document.all.Item("global_login_loginbutton")
Do Until .ReadyState = 4
DoEvents
Loop
ipf.Click

End With

End Sub
 
Back
Top