Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Filling in a web page with Delphi using TWebBrowser

I use Delphi 7 on 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 app to go to Google, detect the Search field, enter a search phrase, and then click the Search button and then get the result.

Can someone shed some light on how this is done?

like image 404
Bill Barnes Avatar asked Oct 11 '22 02:10

Bill Barnes


1 Answers

You need to use the DOM to do this. The best online resource for learning this in a Delphi setting is at Brian Cryer's site. Take a look at How to read and write form elements.

like image 162
David Heffernan Avatar answered Oct 16 '22 06:10

David Heffernan