Good afternoon everyone, I'm inciting in Delphi, I use Delphi XE6 and I need to carry out some processes in the browser.
By using the TWVBrowser and TWVWindowParent components of the WebView4Delphi library, I was able to access/display the browser in Delphi and insert existing information in my software on the web page, but I am having difficulties to fetch some information from the web page and return to my software. Does anyone have any suggestions?
Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
Bring information from the web into Delphi
- salvadordf
- Posts: 4093
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Bring information from the web into Delphi
Hi,
Use JavaScript to search the HTML element where the information is located and send it to Delphi with "window.chrome.webview.postMessage".
See the BrowserHostAppCommunication demo for all the details about sending information between the browser and Delphi. Read the code comments in that demo.
Use JavaScript to search the HTML element where the information is located and send it to Delphi with "window.chrome.webview.postMessage".
See the BrowserHostAppCommunication demo for all the details about sending information between the browser and Delphi. Read the code comments in that demo.
Re: Bring information from the web into Delphi
Thank you Salvador! It worked here.