Hi
I have a code to Automatic log in a website..the website having Image login button.
The problem is this code does not click that login button.
Anyone knows how to click on this type of image button.
VBA Code
HTML Code
Thanks in Advance
I have a code to Automatic log in a website..the website having Image login button.
The problem is this code does not click that login button.
Anyone knows how to click on this type of image button.
VBA Code
Code:
Sub Auto_login()
Set IE = CreateObject("InternetExplorer.Application")
my_url = "https://sapitsp.tsjl.com/sap/bc/gui/sap/its/catw?sap-language=EN"
With IE
.Visible = True
.Navigate my_url
Do Until Not IE.Busy And IE.ReadyState = 4
DoEvents
Loop
End With
IE.Document.getElementById("sap-user").Value = Sheets("Portal").Range("B21").Value
IE.Document.getElementById("sap-password").Value = Sheets("Portal").Range("B22").Value
For Each MyHTML_Element In Document.getElementsByTagName("callsubmitlogin")
If MyHTML_Element.Type = "image" Then
MyHTML_Element.Click: Exit For
End If
Next
Do Until Not IE.Busy And IE.ReadyState = 4
DoEvents
Loop
End Sub
HTML Code
HTML:
<INPUT onclick="callSubmitLogin(' me->co_event_login '); return false;" src="/sap/public/bc/its/mimes/ess_global/99/EN/images/buttons/login.gif" type=image value=Logon>
Thanks in Advance