Log into web site with vb.net

Sorry it has been so long since I posted. I have gone through quite a bit since I last wrote. I do appreciate your prayers for my family as many of you have written in to say.

Anyway, I had a situation where I needed to log into a web site via code. Hope it helps someone.


Join me on Facebook

wb.Navigate("http://someurl.com")
        While (wb.ReadyState <> WebBrowserReadyState.Complete)
            Application.DoEvents()
        End While
        wb.Document.GetElementById("username").InnerText = "[madivad]"
        wb.Document.GetElementById("password").InnerText = "[password]"
        wb.Document.GetElementsByTagName("input")(2).InvokeMember("click")

 

 

Technorati Tags: ,,,,,,,,,,,,,,,

Windows Live Tags: vb.net,.NET Framework,csharp,log into,website,authenticate,Navigate,ReadyState,WebBrowserReadyState,Application,Document,GetElementById,InnerText,password,GetElementsByTagName,InvokeMember

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: