1 Replies - 25428 Views - Last Post: 15 May 2012 - 02:23 PM Rate Topic: -----

#1 gemeda   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 18-April 12

Automatic Login to Website

Posted 15 May 2012 - 02:13 PM

Objective:
I'm trying to log into a website automatically. To my own account of course.


Information I gathered from the website that I assume I need:

<input class="input" type="text" name="user" value="">
<input class="input" type="password" name="password" value="">
<input class="submit" type="submit" value="Log in">




What I have tried:


            Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted

Try
 Dim username As String = "my user name"
            Dim password As String = "my passpor"
            WebBrowser1.document.GetElementById("user").SetAttribute("value", username)
            WebBrowser1.document.GetElementById("password").SetAttribute("value", password)
            WebBrowser1.document.GetElementById("signIn").InvokeMember("click")
        Catch ex As Exception
        End Try
End Sub



Problem: The login in form does not seem to populate with user name and password.

Thanks for your help.

Is This A Good Question/Topic? 0
  • +

Replies To: Automatic Login to Website

#2 m_wylie85   User is offline

  • D.I.C Addict
  • member icon

Reputation: 96
  • View blog
  • Posts: 899
  • Joined: 15-October 10

Re: Automatic Login to Website

Posted 15 May 2012 - 02:23 PM

this may! help

http://www.youtube.c...6&v=7Wzel-g1U54
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1