This code doesn't work!!!
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("http://facebook.com");
// I WANT TO GO TO FACEBOOK DOT COM FIRST!!! AFTER, I WANT TO FILL ALL FORMS AUTOMATICALLY.
foreach (HtmlElement element in webBrowser1.Document.All)
{
if (element.Name == "email")
{
element.InnerText = textBox1.Text;
}
if (element.Name == "pass")
{
element.InnerText = textBox2.Text;
}
}
webBrowser1.Document.GetElementById("uxlqua_5").InvokeMember("click");
}
But this code gives framenetwork error. Because my software try to fill all forms before loading facebook.com .... how can I avoid this error? I want to fill all forms when facebook.com page is loaded in webBrowser1 ...