Loop on links from a page with Webbrowser control

Asked

Viewed 22 times

1

good evening! I need to access a page where it contains several links. I need to enter each of these links and load the next page to also collect the links of the second page invoked. I was able to find the links, but when you run Invoker, it only does for the last link that it took in the Loop. the command I use is this:

Dim links2 As HtmlElementCollection = WebBrowser1.Document.Window.Frames(0).Document.GetElementsByTagName("A")

For Each link2 As HtmlElement In links2
  link2.InvokeMember("Click")
Next

Someone has an idea?

Thank you

  • unless mistaken, HtmlElement belongs to the System.Windows.Forms. It’s Asp.net even the tag ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.