| Author |
Message |
lance27
Joined: 28 Feb 2007 Posts: 6
|
Posted: Wed Feb 28, 2007 4:56 pm Post subject: How to get a list of links on a webpage |
|
|
| 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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6346 Location: Red Gate Software
|
Posted: Thu Mar 01, 2007 1:58 pm Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
lance11
Joined: 28 Feb 2007 Posts: 8
|
Posted: Tue Mar 06, 2007 6:05 pm Post subject: How does the script recorder do it? |
|
|
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 |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6346 Location: Red Gate Software
|
Posted: Tue Mar 06, 2007 6:44 pm Post subject: |
|
|
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. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
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