I'm currently working on a bot that would automatically, given the correct parameters, create an account on my favourite websites. I chose for this example Twitter. The problem is, when I debug this, it loads the form, fills in the correct fields, but the click button is not working and I can't figure out why.
I've watched on the event listeners in the Chrome debug tool, and it says that there's a click function, but I can't call it!
Thanks in advance
The URL I'm working on is : www.twitter.com/signup/
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
HtmlDocument doc = webBrowser1.Document;
HtmlElement fullname = doc.GetElementById("full-name");
HtmlElement email = doc.GetElementById("email");
HtmlElement password = doc.GetElementById("password");
HtmlElement username = doc.GetElementById("username");
fullname.SetAttribute("value", "JustARandomTest");
email.SetAttribute("value", "randomtest@test.com");
password.SetAttribute("value", "randomtest");
username.SetAttribute("value", "randomtest10");
HtmlElement button = doc.GetElementsByTagName("input")["submit_button"];
button.InvokeMember("click");
}
}
}