Red Gate forums :: View topic - How to get a list of links on a webpage
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Load
ANTS Load forum

How to get a list of links on a webpage

Search in ANTS Load forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
lance27



Joined: 28 Feb 2007
Posts: 6

PostPosted: Wed Feb 28, 2007 4:56 pm    Post subject: How to get a list of links on a webpage Reply with quote

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?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6669

PostPosted: Thu Mar 01, 2007 1:58 pm    Post subject: Reply with quote

Hi,

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.
Back to top
View user's profile Send private message
lance11



Joined: 28 Feb 2007
Posts: 8

PostPosted: Tue Mar 06, 2007 6:05 pm    Post subject: How does the script recorder do it? Reply with quote

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...

Cunningly,
Lance
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6669

PostPosted: Tue Mar 06, 2007 6:44 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group