Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Windows App how to get html source code form WebView [closed]

Tags:

c#

windows

How to get html source code form WebView component in c#?

like image 463
Dawid Kozioł Avatar asked Apr 28 '16 16:04

Dawid Kozioł


1 Answers

You can use the InvokeScript or InvokeScriptAsyncmethods. Do make sure the page is loaded first.

string html = await myWebView.InvokeScriptAsync("eval", new string[] { "document.documentElement.outerHTML;" });
var text = html;
like image 50
Tom Droste Avatar answered Nov 03 '22 18:11

Tom Droste