I need a push into the right direction please. My Web Core app needs to load a web page from a foreign web site, browse it's content ("screen scraping") and minipulate some of its content ("form filling") and "click" a button on this web page to post it's content. With Win32-regular Delphi, we loaded the page into a TWebBrowser component and used the components methods to manipulate the loaded DOM. How to do this with Web Core?
In TMS WEB Core, there is a TWebBrowserControl and you can set the URL to the site you wan to navigate to.
Then you should be able to access the DOM of this IFRAME that is used underlying with something like:
var elmnt = this.WebBrowserControl.ElementHandle.contentWindow.document.getElementsByTagName("H1");
It is because document.getElementById("WebBrowserControl1") is null.
You can clearly see that in the browser console.
A component ID is NOT the same as a component.Name
If you inspect the elements, you'll see the IFRAME ID is TForm10_BrowserControl1.
And fwiw, when this IFRAME is on another domain (which it looks like), you won't be able to access its content this way as this is blocked by the browser.