CefSharp在NuGet的简介是“The CefSharp Chromium-based browser component”,机翻的意思就是“基于Cefsharp Chromium的浏览器组件”
第一种方法 就是执行JavaScript代码获取当前html代码
StringBuilder sb = new StringBuilder();
sb.AppendLine("function tempFunction() {");
//sb.AppendLine(" return document.body.innerHTML; ");
sb.AppendLine(" return document.getElementsByTagName('html')[0].innerHTML; ");
sb.AppendLine("}");
sb.AppendLine("tempFunction();");
var task01 = browser.GetBrowser().GetFrame(browser.GetBrowser().GetFrameNames()[]).EvaluateScriptAsync(sb.ToString());
task01.ContinueWith(t =>
{
if (!t.IsFaulted)
{
var response = t.Result;
if (response.Success == true)
{
if (response.Result != null)
{
string resultStr = res