Hi, I'm currently working on a new project (C# and VB) and having problems with the HtmlElement collection. When I use webbrowse.Navigate(url) method, webbrowse.Document.GetElementsbyTagName("input") returns null (even though webbrowser visits the url) when I visit 2nd time. But when I visit first time, everything is fine. The problem is when I visit 2. time with Navigate method, collection is empty. I wonder if there are another methods to visit a link other than Navigate(url) method?
are you waiting till the url is loaded completely ? If you are not waiting then it may return null. set breakpoint on webbrowse.Document.GetElementsb ... and see whether document is loaded then check
yes i am waiting untill the document is complately loaded by web_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles webBrowse.DocumentCompleted