I'm new to Telerik and want to do something fairly simple (I think). I want Telerik to bring up a page in the browser and then save the page source to a file. How to do that?
3 Answers, 1 is accepted
0
Anthony
Telerik team
answered on 13 Aug 2012, 07:26 PM
Hello Chris,
First, be aware that you can set a Breakpoint and use the Capture feature from the Visual Debugger to save a snapshot of the DOM.
To automate this takes just a few lines of code:
string dom = ActiveBrowser.ViewSourceString;
System.IO.StreamWriter file = new System.IO.StreamWriter(@"C:\temp\dom.txt");