jayinthe813
09-05-2012, 09:06 AM
Im able to authenticate into my webpage using:
Sub logmein()
Set ie = CreateObject("internetexplorer.application")
ie.navigate2 "internalsite.com"
Do Until ie.readystate = 4
DoEvents
Loop
ie.Visible = True
'set form for login
Set lform = ie.document.forms(0)
lform("USER").Value = "user"
lform("PASSWORD")Value = "pass"
lform.submit
End Sub
After the login page, I reach a splash page with 3 frames. The first(top) frame is the frame i need to find the element ID, and add the value to the textbox then submit, which i intend to use a variable (pulling from excel). Im not sure how to identify the frame, or form number (Ive found 0 was the default for login page). Is there an easy way to figure out the proper (index?) numbers for the forms and frame?
ie.document.frames(0).document.forms(0).getelementbyid("contractNum").Value = "212" ' I can shorten this later using above code after i figure out how to identify the index number of my frame and form
Sub logmein()
Set ie = CreateObject("internetexplorer.application")
ie.navigate2 "internalsite.com"
Do Until ie.readystate = 4
DoEvents
Loop
ie.Visible = True
'set form for login
Set lform = ie.document.forms(0)
lform("USER").Value = "user"
lform("PASSWORD")Value = "pass"
lform.submit
End Sub
After the login page, I reach a splash page with 3 frames. The first(top) frame is the frame i need to find the element ID, and add the value to the textbox then submit, which i intend to use a variable (pulling from excel). Im not sure how to identify the frame, or form number (Ive found 0 was the default for login page). Is there an easy way to figure out the proper (index?) numbers for the forms and frame?
ie.document.frames(0).document.forms(0).getelementbyid("contractNum").Value = "212" ' I can shorten this later using above code after i figure out how to identify the index number of my frame and form