Hi!
I'm trying to make a program that will automatically log me into a forum. I have the webbrowser control and a button. the site is automatically loaded on form load. I want it to log me in using my username and password when i click the button. I tried it on yahoo.com to test and worked fine. But for some reason when I try it with my forum it doesn't work. My forum is SMF. It seems that the problem lies with the Login button itself. I can easily send the username and password to the corresponding boxes but when it comes to clicking the Login button it fails. What makes that Login button different from the Login button of Yahoo other than having a different name? Below is an example of the code I was using. How can I get it to successfully click the SMF Login button? Please post example code if possible.
Best,Code:Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click WebBrowser1.Document.GetElementById("vb_login_username").SetAttribute("value", TextBox1.Text) WebBrowser1.Document.GetElementById("vb_login_password").SetAttribute("value", TextBox2.Text) WebBrowser1.Document.GetElementById("Login").InvokeMember("click") End Sub
~Chris




Reply With Quote