How to get a list of links on a webpage

lance27lance27 Posts: 9
edited March 6, 2007 12:44PM in ANTS Load
Is there a way to perhaps use the WebClient to fetch an array of found links on a page? Or do I have to parse the returned HTML myself?


  • Brian DonahueBrian Donahue Posts: 6,590 New member

    I'm afraid you're right. You would need to parse WebClient.HttpResponse.Content to find the links in a document. If you can figure out a way to take an HTML string and cast it as a mshtml.IHTMLDocument2 object, then that would give you lots of methods to easily parse the HTML. I couldn't figure out how to do this, though.
  • Hi Brian,
    How does the script recorder do it? As you navigate to different URLs, the recorder creates a script and generates all the fetching of the resources and setting of the header stuff.

    I'm thinking that if that process is open to use, I could feed in a list of URLs from the site I want to test, and have the engine create the script for me...

  • Brian DonahueBrian Donahue Posts: 6,590 New member
    Script recorder is only trapping post data; that is post data being sent to the server. Data coming back from the server is simply forwarded and ignored.
Sign In or Register to comment.