GeckoFx V22
GeckoElement element = null;
var geckoDomElement = WebBrowser1.Document.DocumentElement;
if(geckoDomElement is GeckoElement)
element = (GeckoElement)geckoDomElement ;
var innerHtml = element.InnerHtml;
但没有更多InnerHtml
方法。 如何从壁虎的网页浏览器HTML源?
投射到GeckoHtmlElement而不是GeckoElement。
GeckoHtmlElement element = null;
var geckoDomElement = WebBrowser1.Document.DocumentElement;
if(geckoDomElement is GeckoHtmlElement)
{
element = (GeckoHtmlElement)geckoDomElement;
var innerHtml = element.InnerHtml;
}
文章来源: How to get source HTML from gecko web browser? InnerHtml does not exist any more