Get webpage source with html provided from javascript

If i use this

WebClient client = new WebClient();
String htmlCode = client.DownloadString("http://test.net");

I can use the flexibility package to scan html and get most of the tags that I need, but lack the html that is displayed in javascript.

My question is how to get the final rendered page source using C #. Is there anything more for WebClient to get the final rendered source after running javascript?

+5
source share
3 answers

HTML Agility , , . JavaScript. - Geckofx, - dom , .

http://code.google.com/p/geckofx/

+1
0

You can use the WebBrowser class from System.Windows.Forms.

using (WebBrowser wb = new WebBrowser()) 
{
    //Code here
}

https://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser(v=vs.110).aspx

0
source

All Articles