Solved

Auto login on web page

Posted on 2013-11-22
1
229 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 83

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

778 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