Tuesday, June 18, 2013

OpenWebKitSharp Document Text similar to .NET WebBrowser.

Here's how you get the page source of a WebKitBrowser similar to DocumentText property of a .NET WebBrowser Control.
Code:
JSValue val = webkitBrowser.GetScriptManager.EvaluateScript("document.getElementsByTagName(\"html\")[0].outerHTML;");  
 if (val != null)  
 {  
    PageSource = val.ToString();  
 }  

Greg

0 comments:

Post a Comment