2

I have TEdgeBrowser in Delphi 10.4.2. I would like to extract a RegEx-based string from the HTML code. In the past, it was possible with TWebBrowser (only with IE 11 or below) as selectedEngine.

But my site wants no IE 11+ anymore. So I have to use the Edge-based TEdgeBrowser in Syndey. I found this article to get the source by an script call, but with the latest Edge (Evergreen Standalone from here), I always get the AResultObjectAsJson will be 'null' (no results are returns).

What can I do to accomplish my task?

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Walter Schrabmair
  • 1,251
  • 2
  • 13
  • 26
  • Are you willing to get the source as you said or access to DOM? The difference is that part of the source call JavaScript which produce dynamic content. If you are interested only in source code, then you can a an HTTP component to request that page. – fpiette May 02 '21 at 13:53
  • The problem is I have to interact with the Site in the browser and when it is done (f.e. Select some checkboxes etc) I would like to extract some information from the HTML page code. – Walter Schrabmair May 03 '21 at 14:48
  • 1
    OK, so you need a browser (WbeView2 as far as the EdgeBrowser is concerned) and need access to the DOM to click on buttons and fill data fields. This is done by injecting JavaScript to the page. Have a look at https://blogs.embarcadero.com/execute-scripts-and-view-source-with-tedgebrowser/ – fpiette May 03 '21 at 14:53

0 Answers0