I have tried:
var browser1 = new WebBrowser();
browser1.Navigate("https://zikiti.co.il/");
HtmlDocument document = browser1.Document;
But browser.Document
is null.
Why?
What am I doing wrong ?
public static void FillForm()
{
browser1 = new WebBrowser();
browser1.Navigate(new Uri("https://zikiti.co.il/"));
browser1.Navigated += webBrowser1_Navigated;
Thread.CurrentThread.Join();
}
private static void webBrowser1_Navigated(object sender,
WebBrowserNavigatedEventArgs e)
{
HtmlDocument document = browser1.Document;
System.Console.WriteLine();
}
The application is stuck. Btw, is there any easier way to fill and submit this form? (I cannot see the request header in Fiddler as the page is always blocked by JS).