Esempio n. 1
0
        private static void MainThread(WebBrowser wb)
        {
            using (WebBrowserControlXPathQueriesProcessor proc = new WebBrowserControlXPathQueriesProcessor(wb))
            {
                wb.BlockingNavigate("http://time.com/5215736/time-100-2018-reader-poll/?utm_campaign=apester");

                Sleep(1000);

                HTMLIFrameClass iframe = proc.GetHtmlElement("iframe.tempo-iframe-embed") as HTMLIFrameClass;
                HTMLDocument    doc    = wb.Document.DomDocument as HTMLDocument;

                iframe.scrollIntoView(true);

                if ((iframe.id ?? "").Trim().Length == 0)
                {
                    iframe.id = $"tmp_id_{Guid.NewGuid():N}";
                }


                return;

                object ndx = 0;

                var iframedom = doc.frames.item(ref ndx) as HTMLWindow2Class;
                var innerdoc  = iframedom.document as HTMLDocument;


                var ihtml = innerdoc.documentElement.innerHTML;

                // inner.innerHTML = "<b>kek</b>";
            }
        }