Reputation: 51
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?
Upvotes: 5
Views: 2147
Reputation: 11211
In the google instance you could simply call the search URL directly yourself.
Eg. This URL searches for 'jam'
http://www.google.ie/search?q=jam&ie=UTF-8&oe=UTF-8&hl=en&client=safari
Get your code to change jam for your search string and go to that URL. I hope this is what you are looking for.
Upvotes: 0
Reputation: 613461
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.
Upvotes: 4