Solved

Auto login on web page

Posted on 2013-11-22
1
227 Views
Last Modified: 2013-11-23
How could I auto login to:

http://snapfish.co.uk

Normally I would do this:

    Webbrowser2_ready_or_not = "False"
    WebBrowser2.Navigate ("http://snapfish.co.uk")
    Do Until Webbrowser2_ready_or_not = "True"
        DoEvents
    Loop
    txt1 = WebBrowser2.Document.body.innerHTML
    checker = InStr(1, txt1, "Log In")
    If checker > 0 Then
        Webbrowser2_ready_or_not = "False"
        WebBrowser2.Document.All.Item("sqat_logIn_Link").Click
        Do Until Webbrowser2_ready_or_not = "True"
            DoEvents
        Loop
        WebBrowser2.Document.All.Item("emailaddress").Value = "myusername"
        WebBrowser2.Document.All.Item("password").Value = "mypassword"
        Webbrowser2_ready_or_not = "False"
        WebBrowser2.Document.All.Item("loginsubmit").Click
        Do Until Webbrowser2_ready_or_not = "True"
            DoEvents
        Loop
    Else
    End If

    Exit Sub

Open in new window


But it is not working in this case.  I think it's a java thing.
0
Comment
Question by:hrolsons
1 Comment
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39669767
Yes, their login window is now put up with javascript.  The form variables in your code do not exist on that page.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now