Trying to access a site through a WebBrowser control in VB.Net, and then click a button or link (I've tried both) that executes javascript.
I've identified the element I'm trying to sue, and have tried, e.g.:
elementlist.GetElementsByTagName("a")(j).InvokeMember("click")
to invoke the click event, but it doesn't seem to do anything.
I tried executing the script directly with:
br.Document.Window.DomWindow.execscript("<script goes here>", "JavaScript")
I'm doing a
While Not br.ReadyState = WebBrowserReadyState.Complete
Application.DoEvents()
End While
afterwards, but it never does anything, just sits there on the same page (the javascript is supposed to navigate to a new page). What am I missing?