The question is not new, however none of the tons of answers I tried worked for me. Here is what I used to do before in IE WebBrowser object:
int_start_tag = myWebBrowser.DocumentText.IndexOf("radius:\">");
Looks simple enough. I can't figure out how to do the same thing using WebView2. The commented lines are tests and don't work for me. MessageBox.Show is just for me to verify the contents, but I would be doing some processing on the return data.
private async void button3_Click(object sender, EventArgs e)
{
//String html = await webView21.ExecuteScriptAsync("document.documentElement.outerHTML");
String html = await webView21.CoreWebView2.ExecuteScriptAsync("document.body.outerHTML");
//String htmldecoded = System.Web.Helpers.Json.Decode(html);
MessageBox.Show(html);
}