I am using CefSharp v55.0 in my WinForm project. After the page is loaded, I want to get HTML code from it. And for that I am using this:
- Code: Select all
private void WebBrowserFrameLoadEnded(object sender, FrameLoadEndEventArgs e)
{
if (e.Frame.IsMain)
{
test.ViewSource();
test.GetSourceAsync().ContinueWith(code =>
{
var html = code.Result;
});
}
}
And for the crosscheck, I am also calling test.ViewSource() method, to see that if GetSourceAsync method is getting the whole code or not.
Unfortunetely, codes are different. ViewSource is getting the whole code, but GetSourceAsync is not getting codes by javascript generated in the page.
Plase lead me a way to get source code of the page like ViewSource, or tell me how to capture this ViewSource method's temp file.
Cheers.
PS:
- You can find two source files as attached for ViewSource and GetSource methods.
- You can use "https://goo.gl/kcJMU1" as sample as well. ViewSource includes products, but GetSource doesn't include products.