Page 1 of 1

Re: RetrieveHTML provides an html that appears to confound IHTMLDocument2

Posted: Tue Jun 11, 2019 1:08 pm
by salvadordf
Hi,

The MiniBrowser demo has a context menu option to "Copy HTML to clipboard" and the HTML that I get from ibm.com has several "A" tags.

Perhaps IHTMLDocument2 is having some issues with that HTML or the IBM page you see is different. They send localized content.

Re: RetrieveHTML provides an html that appears to confound IHTMLDocument2

Posted: Fri Jun 14, 2019 6:37 am
by salvadordf
You have 2 alternatives :
  • Use the code in the DOMVisitor demo to search for the A tags using the CEF functions and classes.
  • Use JavaScript to search the A elements and send the results to Delphi. You can use the JSRTTIExtension demo to know how to send that information to Delphi.
Some websites send different HTML contents if you use Internet Explorer. Perhaps you see a different number of A elements because you're using Chromium now.

You would also need to configure TChromium to use the same preferred languages as IE or you might receive different HTML contents.