Populating a Delphi Web Page with TWebBrowser

I am using Delphi 7 for Vista. So far I have implemented a simple browser (using TWebBrowser), but I would like to automatically enter information when the web page asks for it. For example, I want to tell my application to go to Google, find a search field, enter a search phrase and click the Search button, and then get the result.

Can someone shed some light on how this is done?

+4
source share
2 answers

You need to use the DOM for this. The best online resource to learn this in Delphi setup is on the Brian Cryer website . Take a look at How to read and write form elements .

+3
source

In a google instance, you can just directly call the search url.

Eg. This url is looking for "jam"

http://www.google.ie/search?q=jam&ie=UTF-8&oe=UTF-8&hl=en&client=safari 

Get your jam change code for your search bar and go to that URL. Hope this is what you are looking for.

0
source

All Articles