c# - Get GeckoFx firefox browser control iframe html not accessible -


i using geckofx 22 c# web browser control cannot manage access tags within iframe. when check gecko innerhtml seems although iframe tag shows in html, contents of not.

this code used inner html of browser control shows iframe tag empty (when should have doc inside of it):

        geckohtmlelement element = null;             var geckodomelement = webbrowser.document.documentelement;             if (geckodomelement geckohtmlelement)             {                 element = (geckohtmlelement)geckodomelement;                 var innerhtml = element.innerhtml;             } 

previously used code similar code below access individual elements works fine:

geckodocument checkdoc = (geckodocument)webbrowser.window.document; var x = (checkdoc.getelementsbytagname("a").where(b => b.id == "ipt-form-format-aside").first()); 

i able individual elements , change values/trigger events etc without problems main html document in iframe impossible elements of. think perhaps iframe has not been loaded yet or that. there way force control wait frame load before attempting access elements?

string content = null; var iframe = webbrowser.document.getelementsbytagname("iframe").firstordefault() gecko.dom.geckoiframeelement; if(iframe != null) {     var html = iframe.contentdocument.documentelement geckohtmlelement;     if (html != null)         content = html.outerhtml; } 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -