Good day, help solve the problem:
webBrowser1.Navigate("url"); webBrowser1.ScriptErrorsSuppressed = true; while (webBrowser1.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); } webBrowser1.Document.GetElementById("continue").InvokeMember("click"); while (webBrowser1.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); } var txt = webBrowser1.DocumentText; The txt variable is written to the page code received when webBrowser1.Navigate("url"); How can I get the code after a program click on the webBrowser1.Document.GetElementById("continue").InvokeMember("click"); ?
whileloops to throw away. Use theDocumentCompletedevent. - Alexander Petrov