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

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -