Auto login to a website from excel

kram_027

New Member
Joined
Apr 9, 2008
Messages
20
I'm creating an excel macro that will auto login to a website using the credentials from excel. It's working fine except the last part, in which, the website button is supposed to be executed.



Sub GoToWebsiteTest()
Dim appIE As InternetExplorerMedium
Dim objElement As Object
Dim objCollection As Object


Set appIE = New InternetExplorerMedium
sURL = "http://sbcho-appsvr/eSource/eSourceV2"
With appIE
.Navigate sURL
.Visible = True
End With


Do While appIE.Busy Or appIE.ReadyState <> 4
DoEvents
Loop


Set objCollection = appIE.Document.getElementsByTagName("input")


appIE.Document.getElementById("userId").Value = Sheets("Sheet1").Range("C3").Value
appIE.Document.getElementById("password").Value = Sheets("Sheet1").Range("C4").Value
appIE.Document.getElementByClassName("btn btn-small btn-info pull-right").Click


Set appIE = Nothing
End Sub


_____________________________________________________________________________________________

Below is the result whenever I click the “Inspect Element” of the login button:
button class="btn btn-small btn-info pull-right" ng-click="myform.$valid && logon()">Login

Can someone help me figure out how to activate the login button?

Thanks in advance.

<button class="btn btn-small btn-info pull-right" ng-click="myform.$valid && logon()">
</button>
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,214,875
Messages
6,122,044
Members
449,063
Latest member
ak94

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top