Solved

Auto login on web page

Posted on 2013-11-22
1
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
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…

717 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